Skip to main content

Get events by creation number

GEThttps://mainnet-aptos-api.moralis.io/accounts/:address/events/:creation_number
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
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'GET',
headers: {
accept: 'application/json',
'Bearer': 'YOUR_API_KEY'
},
};

fetch('https://mainnet-aptos-api.moralis.io/accounts/:address/events/:creation_number', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
Empty