Skip to main content
WSS
Messages
subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object

Overview

Subscription Parameters

chain_id
number
required
Target EVM network. See the Chain enumeration.
from_addresses
string[]
Optional filter: caller addresses (hex, no 0x).
to_addresses
string[]
Optional filter: callee addresses (hex, no 0x).
call_types
string[]
Optional filter: CALL, DELEGATECALL, STATICCALL, CREATE, CREATE2.

Message Fields

Payload mirrors blockdb_evm.b0111_internal_transactions_v1 (addresses and BYTEA fields as hex strings without 0x in JSON).
block_number
number
Parent transaction block.
block_time
string
Block time (ISO-8601).
tx_index
number
Transaction index in block.
trace_address
string
Call tree position (e.g. 0, 0.1).
call_type
string
CALL, DELEGATECALL, STATICCALL, CREATE, or CREATE2.
from_address
string
Caller (20-byte hex).
to_address
string | null
Callee (20-byte hex); null when not applicable.
value_wei
string
Value transferred in wei (decimal string).
gas
string
Gas allocated for this call frame (integer string).
gas_used
string
Gas consumed by this call frame (integer string).
input
string | null
Calldata (hex string); null when not applicable.
output
string | null
Return data (hex string); null if reverted.
error
string | null
Error string if reverted; null otherwise.
tx_success
boolean
Whether the underlying transaction succeeded.
_tracing_id
string
Lineage id (hex).
_created_at
string
Record creation time (ISO-8601).
_updated_at
string
Record last update time (ISO-8601).

Subscription Example

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

Response Example

{
  "chain_id": 1,
  "dataset_id": "0111",
  "is_reorg": false,
  "data": {
    "block_number": 12345680,
    "block_time": "2025-10-29T00:01:23Z",
    "tx_index": 5,
    "trace_address": "0",
    "call_type": "CALL",
    "from_address": "0000000000000000000000000000000000000000",
    "to_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "value_wei": "1000000000000000000",
    "gas": "100000",
    "gas_used": "63546",
    "input": "a9059cbb000000000000000000000000",
    "output": "0000000000000000000000000000000000000000000000000000000000000001",
    "error": null,
    "tx_success": true,
    "_tracing_id": "0111000000000000000000000000000000000001",
    "_created_at": "2025-11-11T18:42:15.123Z",
    "_updated_at": "2025-11-11T18:42:15.123Z"
  }
}
Last modified on April 6, 2026