starknet_getEvents RPC Method
Parameters
fromBlock
string
REQUIRED
The block hash, the block number (height), or a block tag (latest or pending)
toBlock
string
REQUIRED
The block hash, the block number (height), or a block tag (latest or pending)
address
string
The contract address
keys
array
The key values used to filter the events
chunk_size
integer
REQUIRED
The chunk size
continuation_token
string
The token returned from the previous query. If no token is provided the first page is returned
Returns
result
object
An object with the following fields
events
object
An event object with following fields
from_address
string
From address
data
array
The data
keys
array
The values used to filter the events
block_hash
string
The hash of the block in which the event was emitted
block_number
integer
The number of the block in which the event was emitted
transaction_hash
string
The transaction hash
continuation_token
string
The token returned from the previous query. If no token is provided the first page is returned
Request
1curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/' \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '{5"id": 1,6"jsonrpc": "2.0",7"method": "starknet_getEvents",8"params": [9{10"from_block": "latest",11"to_block": "latest",12"address": "0x04c0a5193d58f74fbace4b74dcf65481e734ed1714121bdc571da345540efa05",13"chunk_size": 1014}15]16}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free