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

Overview

  • Dataset ID: 0304 - Token Transfers
  • Description: Token transfer events (native ETH, ERC-20, ERC-721, ERC-1155) produced by TokenTransfersEngine from transactions, internal transactions, and transfer logs.
  • Sample: Hugging Face Sample

Subscription Parameters

chain_id
number
required
Target EVM network. See the Chain enumeration.
from_addresses
string[]
Optional filter: sender addresses (hex, no 0x).
to_addresses
string[]
Optional filter: recipient addresses (hex, no 0x).
token_addresses
string[]
Optional filter: token contract addresses (hex, no 0x); omit for native transfers where applicable.
transfer_types
string[]
Optional filter: transfer kinds (e.g. native, erc20, erc721, erc1155).

Message Fields

block_number
number
Block containing the transfer.
block_time
string
Block time (ISO-8601).
tx_index
number
Transaction index within the block.
log_index
number | null
Log index when sourced from a log; null when not applicable.
trace_address
string | null
Trace address for internal tx transfers (e.g. "0", "0.1"); null for other types.
from_address
string
Sender address (hex).
to_address
string
Recipient address (hex).
token_address
string | null
Token contract; null for native ETH transfers.
amount_raw
string
Raw amount (integer string in token/native units).
amount_adj
string | null
Decimal-adjusted amount; null if decimals unknown or NFT.
token_id
string | null
NFT / ERC-1155 id when applicable.
transfer_type
integer
Transfer mechanism as integer enum (see Transfer Type).
_tracing_id
string
Row lineage id (hex).
_parent_tracing_ids
string[]
Parent lineage ids (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": "0304", "chain_id": 1, "params": {}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0304",
  "is_reorg": false,
  "data": {
    "block_number": 12345680,
    "block_time": "2025-10-29T00:01:23Z",
    "tx_index": 5,
    "log_index": 2,
    "trace_address": null,
    "from_address": "0000000000000000000000000000000000000000",
    "to_address": "0000000000000000000000000000000000000001",
    "token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount_raw": "1000000000000000000",
    "amount_adj": "1.0",
    "token_id": null,
    "transfer_type": 2,
    "_tracing_id": "0304000000000000000000000000000000000001",
    "_parent_tracing_ids": [
      "0102000000000000000000000000000000000001",
      "0201000000000000000000000000000000000001"
    ],
    "_created_at": "2025-11-11T18:42:15.123Z",
    "_updated_at": "2025-11-11T18:42:15.123Z"
  }
}
Last modified on April 6, 2026