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 for supported values.
exchange_ids
number[]
Filter notifications to specific exchange identifiers. See the DigitalExchange enumeration.
pool_type_ids
number[]
Filter pools by archetype.

Message Fields

pool_uid
string
BlockDB internal pool identifier (32-byte hex).
exchange_id
number
Exchange identifier.
type_id
number
Pool type identifier.
block_number
number
Block height containing the pool creation / genesis record.
block_time
string
Block time (ISO-8601).
tx_index
number
Transaction index.
log_index
number
Log index.
factory
string
Factory or pool-manager contract address (20-byte hex).
tokens
string[]
Token contract addresses that compose the pool.
contract_id
string | null
Incarnation id for v2/v3 pools; null for v4-style pools.
contract_address
string | null
Pool contract address when applicable (20-byte hex).
pool_id
string | null
Protocol-specific pool id (e.g. Uniswap V4), when applicable.
pairnum
number | null
Internal pair ordinal, when applicable.
asset_managers
string[] | null
Asset manager addresses for Balancer-style pools, when applicable.
amp
number | null
Amplification parameter for stable pools, when applicable.
weights
number[] | null
Token weights for weighted pools, when applicable.
tick_spacing
number | null
Tick spacing for concentrated-liquidity pools, when applicable.
_tracing_id
string
Row-level lineage hash for correlation.
_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": "0211", "chain_id": 1, "params": {"exchange_ids": [1, 2]}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0211",
  "is_reorg": false,
  "data": {
    "pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
    "exchange_id": 1,
    "type_id": 2,
    "block_number": 567890,
    "block_time": "2018-07-07T12:34:56.000Z",
    "tx_index": 4,
    "log_index": 2,
    "factory": "1f98431c8ad98523631ae4a59f267346ea31f984",
    "tokens": [
      "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
    ],
    "contract_id": "0000000000000000000000000000000000000000000000000000",
    "contract_address": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "pool_id": null,
    "pairnum": 42,
    "asset_managers": null,
    "amp": null,
    "weights": [
      0.5,
      0.5
    ],
    "tick_spacing": null,
    "_tracing_id": "0211000000000000000000000000000000000001",
    "_parent_tracing_ids": [
      "0103000000000000000000000000000000000001",
      "0103000000000000000000000000000000000002"
    ],
    "_created_at": "2025-11-11T18:42:15.123Z",
    "_updated_at": "2025-11-11T18:42:15.123Z"
  }
}
Last modified on April 6, 2026