curl -X POST "https://api.blockdb.io/v1/evm/prices/spot/crypto/prints" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"from_block": 18930000,
"to_block": 18939999,
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
],
"limit": 250,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"request_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
]
}
},
"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_raw": "10000000000000000000",
"amount_in": "10",
"amount_out_raw": "30241122334455667788990",
"amount_out": "30241.12233445566778899",
"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"
}
],
"cursor": null,
"page_count": 1
}
Pricing Suite - Crypto
Prices · Spot Prints
Retrieve executed swap prints (realized token_in → token_out price & sizes) from on-chain swap events.
POST
/
v1
/
evm
/
prices
/
spot
/
crypto
/
prints
curl -X POST "https://api.blockdb.io/v1/evm/prices/spot/crypto/prints" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"from_block": 18930000,
"to_block": 18939999,
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
],
"limit": 250,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"request_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
]
}
},
"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_raw": "10000000000000000000",
"amount_in": "10",
"amount_out_raw": "30241122334455667788990",
"amount_out": "30241.12233445566778899",
"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"
}
],
"cursor": null,
"page_count": 1
}
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.
- CSV Sample: Download
- JSON Sample: Download
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).Range Filters (mutually exclusive)
Starting block number (inclusive) for the query. Use with
to_block.Ending block number (inclusive) for the query. Use with
from_block.Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with
to_timestamp.Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with
from_timestamp.Validation rule:
You must provide either a block range, a time range, or at least one direct selector.
Providing more than one option results in HTTP 400.
Providing none results in HTTP 400.
You must provide either a block range, a time range, or at least one direct selector.
Providing more than one option results in HTTP 400.
Providing none results in HTTP 400.
Direct Selectors
Filter by exchange identifiers. See the DigitalExchange enumeration.
Restrict to specific BlockDB pool identifiers.
Pagination Controls
Recommended default
250; maximum 1000 to stay under ~10 MB responses.Opaque pagination cursor supplied by a previous response.
Decimals-Adjusted Amounts
Off by default. When set to
true, the response includes data.amount_in and data.amount_out (decimals-adjusted, may be null) alongside the raw integer fields. Enabling it adds a per-request ERC-20 decimals lookup (extra join) that increases latency, so it is opt-in; when omitted or false, those fields are returned as null and only the always-present *_raw fields are populated.Response Fields
Meta
Echo of request metadata applied to the response.
EVM chain ID echoed from the request.
ERC-20 contract address of the base asset, echoed from the request.
ERC-20 contract address of the quote asset, echoed from the request.
Pure echo of the window you sent (
from_block/to_block/from_timestamp/to_timestamp); unset bounds are null.The concrete window the query actually executed against, after resolving the request. For a block range on a time-bucketed endpoint (OHLC/VWAP/VWAP-aggregate/fiat VWAP),
from_timestamp/to_timestamp hold the resolved timestamp window (and from_block/to_block echo your request). For a time range on a block-keyed endpoint, from_block/to_block hold the resolved block range (and the timestamps echo your request). null for selector-only requests (no window). No extra database work is done — these are the values the query already computed.Resolved/echoed start block of the executed window.
Resolved/echoed end block of the executed window.
Resolved/echoed start timestamp (ISO-8601) of the executed window.
Resolved/echoed end timestamp (ISO-8601) of the executed window.
Filter parameters echoed from the request.
Data
Swap print records matching the request.
BlockDB pool identifier where the swap occurred.
Exchange/DEX identifier.
Pool type identifier.
Block height where the swap event was observed.
UTC timestamp of the block containing the swap.
Zero-based transaction index within the block.
Zero-based log index within the transaction.
20-byte address of the input token (direction of trade).
20-byte address of the output token for this swap direction.
Amount of
token_in executed in the swap, as a raw integer in the token’s smallest denomination. String-encoded to preserve uint256 precision.Decimals-adjusted form of
amount_in_raw (amount_in_raw / 10^decimals). null when the input token’s decimals are unknown or when include_adjusted_amounts=false.Amount of
token_out received in the swap, as a raw integer in the token’s smallest denomination. String-encoded to preserve uint256 precision.Decimals-adjusted form of
amount_out_raw. null when the output token’s decimals are unknown or when include_adjusted_amounts=false.Realized execution price:
token_out per 1 token_in (decimals-adjusted). May be null.Tracing identifier for the swap print record (hex string, no
0x prefix).Parent lineage references (hex strings, no
0x prefix).Record creation timestamp (ISO-8601).
Record update timestamp (ISO-8601).
Envelope Fields
Pagination cursor.
Number of swap print entries returned.
Usage Notes
- Swap prints represent historical execution outcomes, not forward-looking quotes
- Each print corresponds to a single on-chain swap event with directional pair information
- Use
exec_priceto analyze realized slippage and execution quality - Filter by
pool_uidsto compare execution prices across different AMM pools - The
token_inandtoken_outfields define the swap direction; reverse the pair to see the opposite direction
curl -X POST "https://api.blockdb.io/v1/evm/prices/spot/crypto/prints" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"from_block": 18930000,
"to_block": 18939999,
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
],
"limit": 250,
"cursor": null
}'
{
"meta": {
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"request_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
]
}
},
"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_raw": "10000000000000000000",
"amount_in": "10",
"amount_out_raw": "30241122334455667788990",
"amount_out": "30241.12233445566778899",
"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"
}
],
"cursor": null,
"page_count": 1
}
Last modified on May 29, 2026
Was this page helpful?
⌘I