events
Get events by event handle
This API extracts event key from the account resource identified by the event_handle_struct and field_name, then returns events identified by the event key.
get/accounts/{address}/events/{event_handle_struct}/{field_name}
Path parameters
addressstring address required
Hex-encoded 16 bytes Aptos account address.
Prefixed with 0x and leading zeros are trimmed.
See doc for more details.
Example:0xdd
event_handle_structstring move_type required
String representation of an on-chain Move struct type.
It is a combination of:
- Move module address, module name and struct name joined by ::.
- struct generic type parameters joined by , .
Examples:
- 0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- 0x1::account::Account
Note:
- Empty chars should be ignored when comparing 2 struct tag ids.
- When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
See doc for more details.
Example:0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
field_namestring required
The field name of the EventHandle in the struct.
Query parameters
startinteger
The start sequence number in the EVENT STREAM, defaulting to the latest event. The events are returned in the reverse order of sequence numbers.
limitinteger
The number of events to be returned for the page default is 5
Response
Returns events
Example response
[
{
"key": "0x00000000000000000000000000000000000000000a550c18",
"sequence_number": "23",
"type": "0x1::account::CreateAccountEvent",
"data": {
"created": "0xa550c18",
"role_id": "0"
}
}
]