⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

starknet_getEvents

Returns all events matching the given filter

Returns all event objects matching the conditions in the provided filter

Parameters

ParameterTypeDescription
filterobjectEvent filter with from_block, to_block, address, keys, and chunk_size

Request

{
"jsonrpc": "2.0",
"method": "starknet_getEvents",
"params": [
{
"chunk_size": 1,
"from_block": {
"block_hash": "0x05abbad1e5"
},
"to_block": {
"block_hash": "0x05abbad1e5"
},
"address": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"keys": [
[
"0x1"
]
]
}
],
"id": 1
}

Returns

All the event objects matching the filter

Events chunk with matching events and continuation token

Errors

CodeMessage
31Requested page size is too big
33The supplied continuation token is invalid or unknown
24Block not found
34Too many keys provided in a filter

Examples

curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_getEvents",
"params": [
{
"chunk_size": 1,
"from_block": {
"block_hash": "0x05abbad1e5"
},
"to_block": {
"block_hash": "0x05abbad1e5"
},
"address": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"keys": [
[
"0x1"
]
]
}
],
"id": 1
}'