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

Description

The Reserves stream delivers real-time snapshots of AMM pool liquidity states. Data is normalized across different pool types (constant-product, concentrated liquidity, weighted pools), allowing for consistent real-time analytics.

Subscription Parameters

chain_id
number
required
Target EVM network.
pool_uids
string[]
Filter updates to specific BlockDB pool identifiers.
include_details
boolean
default:"false"
Include tick-range or bin-level liquidity breakdowns for concentrated liquidity pools.

Message Fields

pool_uid
string
BlockDB pool identifier.
reserves
string[]
Raw token reserves for even-liquidity pools (one entry per token).
current_tick
number
Active tick for concentrated-liquidity pools.
current_sqrt_price
string
Q64.96 sqrt price.
block_number
number
Block height where the reserve change occurred.
_tracing_id
string
Row-level lineage hash for correlation.

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": "0301", "chain_id": 1, "params": {"include_details": true}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0301",
  "is_reorg": false,
  "data": {
    "pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
    "exchange_id": 1,
    "block_number": 18934567,
    "block_time": "2025-11-11T18:42:15.123Z",
    "reserves": [
      "169649594140000000000000",
      "60446403492000000000"
    ],
    "current_tick": 210130,
    "current_sqrt_price": "14614467034852101032872730522039888223787",
    "current_bin": null,
    "_tracing_id": "0301000000000000000000000000000000000000",
    "_created_at": "2025-11-11T18:42:15.123Z"
  }
}