Get events by creation number
Event types are globally identifiable by an account address
and monotonically increasing creation_number
, one per event type emitted to the given account. This API returns events corresponding to that that event type.
Copy curl -X POST --data '{
"jsonrpc": "2.0",
"id" : 1,
"method" : "getEventsByCreationNumber",
"params" : [{"address":"0x7e95b0c90bf89fab82a8f98fbf8062f7bed3ca721aaa2d91dbb712a5b7e8ea6a","creation_number":"1"}]}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/DzPNqR5pKULXDNwT7Wx33Y6RYzigiR8HacnvT82KYhV6an3iw/rpc
with option params start, limit .
Copy curl -X POST --data '{
"jsonrpc": "2.0",
"id" : 1,
"method" : "getEventsByCreationNumber",
"params" : [{"address":"0x7e95b0c90bf89fab82a8f98fbf8062f7bed3ca721aaa2d91dbb712a5b7e8ea6a","creation_number":"1","start":"10","limit":10 }]}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/DzPNqR5pKULXDNwT7Wx33Y6RYzigiR8HacnvT82KYhV6an3iw/rpc
Get events by event handle
This API uses the given account address
, eventHandle
, and fieldName
to build a key that can globally identify an event types. It then uses this key to return events emitted to the given account matching that event type.
Copy curl -X POST --data '{
"jsonrpc": "2.0",
"id" : 1,
"method" : "getEventsByEventHandle",
"params" : [{"address":"0x7e95b0c90bf89fab82a8f98fbf8062f7bed3ca721aaa2d91dbb712a5b7e8ea6a","event_handle":"0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>","field_name":"withdraw_events" }]}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/2gLyawqthdiyrJktJmdnDAb1XVc6xwJXU6iJKu3Uwj21F2mXAK/rpc
with option params start, limit .
Copy curl -X POST --data '{
"jsonrpc": "2.0",
"id" : 1,
"method" : "getEventsByEventHandle",
"params" : [{"address":"0x7e95b0c90bf89fab82a8f98fbf8062f7bed3ca721aaa2d91dbb712a5b7e8ea6a","event_handle":"0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>","field_name":"withdraw_events","start":"10","limit":10 }]}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/2gLyawqthdiyrJktJmdnDAb1XVc6xwJXU6iJKu3Uwj21F2mXAK/rpc