Skip to main content

/v1/accounts/:address:/events/:event_handle:/:field_name:

This API uses the given account address, eventHandle, and fieldName to build a key that can globally identify event types. It then uses this key to return events emitted to the given account matching that event type.

Parameters

  • address REQUIRED: (string) - Hex-encoded 32-byte Aptos account, with or without a 0x prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.
  • event_handle REQUIRED: (string)- Creation number corresponding to the event stream originating from the given account.
  • field_name REQUIRED: (string)- Name of field to lookup event handle e.g. withdraw_events
  • limit OPTIONAL: (string<uint64>) - Max number of events to retrieve.
  • start OPTIONAL: (string<uint64>) - Starting sequence number of events.

Returns

array of:

  • version (string<uint64>): A string containing a 64-bit unsigned integer.
  • guid (object)
    • creation_number (string<uint64>): A string containing a 64-bit unsigned integer.
    • account_address (string<hex>): A hex-encoded 32 byte Aptos account address.
  • sequence_number (string<uint64>): A string containing a 64-bit unsigned integer.
  • type (string): String representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u64 - u128 - address - signer - vector: vector<{non-reference MoveTypeId}> - struct: {address}::{module_name}::{struct_name}::<{generic types}>
Vector type value examples:
- `vector<u8>`
- `vector<vector<u64>>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
  • data The JSON representation of the event

Example

Request

curl --request GET \
--url https://aptos-mainnet.blastapi.io/<project-id>/v1/accounts/0xc32f662cd9718f02d8a8e5628f8f642fa27cd9b5f457b406ed734901a4939e34/events/0x1::account::Account/withdraw_events \
--header 'Content-Type: application/json'