Skip to main content
Version: 2.2

Get events by creation number

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

Get events by creation number for a given address.

PATH PARAMS
addressstringrequired
Address of account with or without a 0x prefix
creation_numberstringrequired
Creation number corresponding to the event stream originating from the given account.
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.getEventsByCreationNumber({
"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>"
}
]