Description
Returns executed swap prints representing realized execution prices from actual swap events. Unlike liquidity depth or impact grids, swap prints capture what prices were actually achieved in practice, with no forward-looking quotes or liquidity modeling.
For fiat quotes (e.g., USD, EUR), use the dedicated /evm/prices/spot/fiat/* endpoints.
Parameters
Target EVM chain. See the Chain enumeration for supported values.
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.
Direct Selectors
Restrict to specific BlockDB pool identifiers.
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
Opaque pagination cursor supplied by a previous response.
Response Fields
EVM chain ID echoed at the response root.
ERC-20 contract address of the base asset.
ERC-20 contract address of the quote asset.
Echo of request metadata applied to the response.
Normalized block/timestamp bounds derived from the request.
Filter parameters echoed from the request.
Data
Swap print records matching the request.
BlockDB pool identifier where the swap occurred.
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 (decimals-adjusted).
Amount of token_out received in the swap (decimals-adjusted).
Realized execution price: token_out per 1 token_in (decimals-adjusted).
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.
Tracing identifier for the swap print record.
Parent lineage references.
data._genesis_tracing_ids
Lineage references to original on-chain events.
Record creation timestamp.
Envelope Fields
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_price to analyze realized slippage and execution quality
- Filter by
pool_uids to compare execution prices across different AMM pools
- The
token_in and token_out fields 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
}'
{
"chain_id": 1,
"base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"meta": {
"request_window": {
"from_block": 18930000,
"to_block": 18939999,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"exchange_ids": [
1,
2
],
"pool_uids": [
"88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
]
}
},
"data": [
{
"chain_id": 1,
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"token_in": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token_out": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount_in": "10.000000000000000000",
"amount_out": "30241.122334455667788990",
"exec_price": "3024.112233445566778899",
"block_number": 18930123,
"block_time": "2025-11-11T18:15:30Z",
"tx_index": 5,
"log_index": 12,
"_tracing_id": "0302000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0203000000000000000000000000000000000000"
],
"_genesis_tracing_ids": [
"0103000000000000000000000000000000000001"
],
"_created_at": "2025-11-11T18:15:35.000Z",
"_updated_at": "2025-11-11T18:15:35.000Z"
}
],
"cursor": null,
"count": 1
}