LLM Notice: This documentation site supports content negotiation for AI agents. Request any page with Accept: text/markdown or Accept: text/plain header to receive Markdown instead of HTML. Alternatively, append ?format=md to any URL. All markdown files are available at /md/ prefix paths. For all content in one file, visit /llms-full.txt
Skip to main content

Events

Provides blockchain events. The response can be configured using additional arguments to filter and retrieve only filtered events instead of all events.

Example Request​

Started from latest block for event types flow.AccountKeyAdded and flow.AccountKeyRemoved:


_11
{
_11
"subscription_id": "some-id",
_11
"action": "subscribe",
_11
"topic": "events",
_11
"arguments": {
_11
"event_types": [
_11
"flow.AccountKeyAdded",
_11
"flow.AccountKeyRemoved"
_11
]
_11
}
_11
}

Started from block height 106197172 for contracts A.f919ee77447b7497.FlowFees and A.1654653399040a61.FlowToken with heartbeat interval equal 10 blocks:


_13
{
_13
"subscription_id": "some-id",
_13
"action": "subscribe",
_13
"topic": "events",
_13
"arguments": {
_13
"start_block_height": "106197172",
_13
"heartbeat_interval": "10",
_13
"contracts": [
_13
"A.f919ee77447b7497.FlowFees",
_13
"A.1654653399040a61.FlowToken"
_13
]
_13
}
_13
}

Started from block id 44774d980c75d9380caaf4c65a2ee6c4bde9a1e6da6aa858fe2dc5e4a7aff773 for account addresses 0xe544175ee0461c4b and 2d4c3caffbeab845 with heartbeat interval equal 5 blocks:


_13
{
_13
"subscription_id": "some-id",
_13
"action": "subscribe",
_13
"topic": "events",
_13
"arguments": {
_13
"start_block_id": "44774d980c75d9380caaf4c65a2ee6c4bde9a1e6da6aa858fe2dc5e4a7aff773",
_13
"heartbeat_interval": "5",
_13
"addresses": [
_13
"0xe544175ee0461c4b",
_13
"2d4c3caffbeab845"
_13
]
_13
}
_13
}

Request Arguments​

NameTypeRequiredDescription
start_block_idSTRINGNOThe ID of the block from which the subscription starts. If this argument is set, it is not possible to set start_block_height.
start_block_heightSTRINGNOThe height of the block from which the subscription starts. If this argument is set, it is not possible to set start_block_id
heartbeat_intervalSTRINGNOMaximum number of blocks between messages after which a response with no events is returned. This helps the client track progress for sparse event filters.
event_typesLISTNOA comma-separated list of event types to include.
addressesLISTNOA comma-separated list of addresses who's events should be included. The format could be "0xe544175ee0461c4b" or "e544175ee0461c4b".
contractsLISTNOA comma-separated list of contracts who's events should be included. The format is "A.f919ee77447b7497.FlowFees"

If neither start_block_id nor start_block_height is set, the subscription will start from the latest block based on its status.

Example Response​


_33
{
_33
"subscription_id": "some-id",
_33
"topic": "events",
_33
"payload": {
_33
"block_id": "660ce05ff19193a08c24730cdc0d747da76dfcc39fbab523d970270f2d5c9a3c",
_33
"block_height": "106197288",
_33
"block_timestamp": "2025-03-11T12:46:03.588742664Z",
_33
"events": [
_33
{
_33
"type": "flow.AccountKeyAdded",
_33
"transaction_id": "7d9290e54437b4b9a5de416c04af6d597fcf5bf1cefcf618232ad86e5f71322b",
_33
"transaction_index": "1",
_33
"event_index": "14",
_33
"payload": "2IGChNigg0BpUHVibGljS2V5goJpcHVibGljS2V52IvYiQyCcnNpZ25hdHVyZUFsZ29yaXRobdiIQQLYpINBAW1IYXNoQWxnb3JpdGhtgYJocmF3VmFsdWXYiQzYpINBAnJTaWduYXR1cmVBbGdvcml0aG2BgmhyYXdWYWx1ZdiJDNiig0EDdGZsb3cuQWNjb3VudEtleUFkZGVkhYJnYWRkcmVzc9iJA4JpcHVibGljS2V52IhAgmZ3ZWlnaHTYiReCbWhhc2hBbGdvcml0aG3YiEEBgmhrZXlJbmRleNiJBILYiEEDhUhbvtriVP1Dy4KYQBUYNhhKGHoYZhicGHwYwxgYGKcYqxhqGIcYZxiCGKMXGDgYRRjnGGQYjBieGIIYxhiUGIgY+BjjGM0YlxhBGL0Y2hiyGHUY8hjoGBwYMhiUGC4YIxjtGNkYJhgoGPMYNxgmGF0YqhgjGP0YlRh2GMoYTxihGOIYsBizGEsYVIECGwAAABdCgQcAgQPCQA=="
_33
},
_33
{
_33
"type": "flow.AccountKeyAdded",
_33
"transaction_id": "7d9290e54437b4b9a5de416c04af6d597fcf5bf1cefcf618232ad86e5f71322b",
_33
"transaction_index": "1",
_33
"event_index": "15",
_33
"payload": "2IGChNigg0BpUHVibGljS2V5goJpcHVibGljS2V52IvYiQyCcnNpZ25hdHVyZUFsZ29yaXRobdiIQQLYpINBAW1IYXNoQWxnb3JpdGhtgYJocmF3VmFsdWXYiQzYpINBAnJTaWduYXR1cmVBbGdvcml0aG2BgmhyYXdWYWx1ZdiJDNiig0EDdGZsb3cuQWNjb3VudEtleUFkZGVkhYJnYWRkcmVzc9iJA4JpcHVibGljS2V52IhAgmZ3ZWlnaHTYiReCbWhhc2hBbGdvcml0aG3YiEEBgmhrZXlJbmRleNiJBILYiEEDhUhbvtriVP1Dy4KYQBg2GMoY4QYYUhiTGNkYjBinGFsYuhiPGEQYcBjrGKoYdRhsGCkYVRivGMIYRxj6GCUYpRj1GJ4YeRipDgoYPBiLGKAYdgkY8RhVGC4YKxhHGDYYVRiqGOcIGGsYOhhwGIgEGKwYyhj4AxgxGLwYpxhuGMQYtxjsGKeBAhsAAAAXSHboAIEDwkEB"
_33
},
_33
{
_33
"type": "flow.AccountKeyAdded",
_33
"transaction_id": "7d9290e54437b4b9a5de416c04af6d597fcf5bf1cefcf618232ad86e5f71322b",
_33
"transaction_index": "1",
_33
"event_index": "16",
_33
"payload": "2IGChNigg0BpUHVibGljS2V5goJpcHVibGljS2V52IvYiQyCcnNpZ25hdHVyZUFsZ29yaXRobdiIQQLYpINBAW1IYXNoQWxnb3JpdGhtgYJocmF3VmFsdWXYiQzYpINBAnJTaWduYXR1cmVBbGdvcml0aG2BgmhyYXdWYWx1ZdiJDNiig0EDdGZsb3cuQWNjb3VudEtleUFkZGVkhYJnYWRkcmVzc9iJA4JpcHVibGljS2V52IhAgmZ3ZWlnaHTYiReCbWhhc2hBbGdvcml0aG3YiEEBgmhrZXlJbmRleNiJBILYiEEDhUhbvtriVP1Dy4KYQBjTABhfGC8YmBiZGLoYwBjEGI0YwBjJGJwYVRhxGJ0YxRjKCRj6AxhaEBiEGI0YfBj3GM0YPhiDGFIYrBg/GMgYnBh0GFQYNBhAGFEYZxi/GNMIGB8YeRhEGKQYbRhHGHAYShjyGEYYnhjrGCEYZBjBGLYYYxg5GBwYkoECGgX14QCBA8JBAg=="
_33
}
_33
],
_33
"message_index": 11
_33
}
_33
}

Rate this page