Messages
{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"params": {
"base_token_address": "<string>",
"quote_token_address": "<string>"
}
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}No examples foundNo examples found{
"chain_id": 123,
"dataset_id": "<string>",
"is_reorg": true,
"data": {
"exec_price": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"token_in": "<string>",
"token_out": "<string>",
"block_number": 123,
"_tracing_id": "<string>"
}
}Pricing Suite - Crypto
Spot Prints
Subscribe to real-time realized swap prices and execution sizes.
WSS
Overview
- Dataset ID:
0302 - Token-to-Token Swap Prints - Description: Executed swap prints (realized token_in → token_out price & sizes) per on-chain swap event.
- Sample: Hugging Face Sample
Subscription Parameters
ERC-20 contract address for the base asset (hex string, 20 bytes, no
0x prefix).ERC-20 contract address for the quote asset (hex string, 20 bytes, no
0x prefix).Message Fields
Pool identifier.
Exchange/DEX identifier.
Pool type identifier.
Block height where the swap occurred.
Block time (ISO-8601).
Transaction index.
Log index.
Address of the input token.
Address of the output token.
Amount of
token_in (raw units, integer string).Amount of
token_out (raw units, integer string).Realized execution price:
token_out per 1 token_in (decimals-adjusted). May be null.Row-level lineage hash for correlation.
Parent lineage ids (hex).
Record creation time (ISO-8601).
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": "0302", "chain_id": 1, "params": {"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}'
Response Example
{
"chain_id": 1,
"dataset_id": "0302",
"is_reorg": false,
"data": {
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 201,
"block_number": 18930123,
"block_time": "2025-11-11T18:15:30.000Z",
"tx_index": 5,
"log_index": 12,
"token_in": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token_out": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount_in": "10000000000000000000",
"amount_out": "30241122334455667788990",
"exec_price": "3024.112233445566778899",
"_tracing_id": "0302000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0203000000000000000000000000000000000000"
],
"_created_at": "2025-11-11T18:15:35.000Z",
"_updated_at": "2025-11-11T18:15:35.000Z"
}
}
Messages
{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"params": {
"base_token_address": "<string>",
"quote_token_address": "<string>"
}
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}No examples foundNo examples found{
"chain_id": 123,
"dataset_id": "<string>",
"is_reorg": true,
"data": {
"exec_price": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"token_in": "<string>",
"token_out": "<string>",
"block_number": 123,
"_tracing_id": "<string>"
}
}subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object
Last modified on April 6, 2026
Was this page helpful?
⌘I