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
Filter updates to specific BlockDB pool identifiers.
Include tick-range or bin-level liquidity breakdowns for concentrated liquidity pools.
Message Fields
Raw token reserves for even-liquidity pools (one entry per token).
Active tick for concentrated-liquidity pools.
Block height where the reserve change occurred.
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"
}
}