Skip to main content
WSS
wss://stream.blockdb.io/v1/evm/
Messages
subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object

Description

The Logs stream delivers raw EVM logs (event emissions) enriched with provenance metadata in real-time. Use topic filters to subscribe only to the events you care about.

Subscription Parameters

chain_id
number
required
Target EVM network.
contract_addresses
string[]
Filter by emitting contract address (hex string, 20 bytes, no 0x prefix).
topic_zeros
string[]
Filter by the primary event topic (e.g., Transfer, Swap signature hashes).

Message Fields

contract_address
string
Address of the emitting contract.
topic_zero
string
Primary topic hash identifying the event.
data_topics
string[]
Subsequent event topics (indexed parameters).
data
string
Raw event data payload (hex string).
block_number
number
Block height containing the log.
tx_hash
string
Keccak-256 hash of the transaction emitting the log.
_tracing_id
string
Tracing identifier for lineage correlation.

Subscription Example

# Use wscat to connect and subscribe
wscat -c wss://stream.blockdb.io/v1/evm/ \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -x '{"action": "subscribe", "dataset_id": "0103", "chain_id": 1, "params": {"topic_zeros": ["ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0103",
  "is_reorg": false,
  "data": {
    "block_number": 12345678,
    "block_hash": "f78e26c5959a94d6a62ed3837f5dcecf0d3761bf0a502e12a08fd7bc44c8568d",
    "block_time": "2025-11-11T18:42:15.123Z",
    "tx_hash": "7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0",
    "tx_index": 4,
    "log_index": 0,
    "contract_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "topic_zero": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "data_topics": [
      "0000000000000000000000000000000000000000000000000000000000000000",
      "0000000000000000000000000000000000000000000000000000000000000001"
    ],
    "data": "00000000000000000000000000000000000000000000000000000000000003e8",
    "_tracing_id": "0103000000000000000000000000000000000000",
    "_created_at": "2025-11-11T18:42:15.123Z"
  }
}