Skip to main content
Version: 2.2

Get events by event handle

GEThttps://mainnet-aptos-api.moralis.io/accounts/:address/events/:event_handle/:field_name

Get events by event handle for a given address.

PATH PARAMS
addressstringrequired
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_handlestringrequired
Name of struct to lookup event handle.
field_namestringrequired
Name of field to lookup event handle.
QUERY PARAMS
limitnumber

Max number of account resources to retrieve. If not provided, defaults to default page size.

startstring

Starting sequence number of events. If unspecified, by default will retrieve the most recent events

Responses
200 array
versionstringrequired

A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

guidrequired
creation_numberstringrequired

A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

account_addressstringrequired

A hex encoded 32 byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.

sequence_numberstringrequired

A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

typestringrequired
String representation of an on-chain Move type tag that is exposed in transaction payload.
datarequired
The JSON representation of the event
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.accounts.getEventsByEventHandle({
"limit": 5,
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
[
{
"version": "32425224034",
"guid": {
"creation_number": "32425224034",
"account_address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
},
"sequence_number": "32425224034",
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>"
}
]