Skip to main content
WSS
wss://stream.blockdb.io/v1/evm/
Messages
subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object

Description

The Pool Fee Terms stream delivers notifications whenever a pool’s fee configuration is updated on-chain. This includes changes to the total swap fee or the split between recipients (LPs, protocol, etc.).

Subscription Parameters

chain_id
number
required
Target EVM network.
pool_uids
string[]
Filter updates to specific BlockDB pool identifiers.
exchange_ids
number[]
Filter updates by exchange identifiers.

Message Fields

pool_uid
string
BlockDB pool identifier.
total_fee
string
Total fee fraction (e.g., 0.003 = 0.30%).
user_fee
string
Fee fraction allocated to LPs/users.
protocol_fee
string
Fee fraction allocated to the protocol.
block_number
number
Block height where the update occurred.
_tracing_id
string
Row-level lineage hash for correlation.

Subscription Example

# Use wscat to connect and subscribe
wscat -c wss://stream.blockdb.io/v1/evm/ \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -x '{"action": "subscribe", "dataset_id": "0204", "chain_id": 1, "params": {"pool_uids": ["88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"]}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0204",
  "is_reorg": false,
  "data": {
    "pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
    "block_number": 19001234,
    "block_time": "2025-12-20T12:34:56Z",
    "total_fee": "0.003000000000000000",
    "user_fee": "0.003000000000000000",
    "protocol_fee": "0.000000000000000000",
    "extra_fee": "0.000000000000000000",
    "_tracing_id": "0204c0ffee0000000000000000000000000000000000000000000000000001",
    "_created_at": "2025-12-20T12:35:01Z"
  }
}