Skip to main content
POST

Overview

Parameters

number
required
Target EVM chain. See the Chain enumeration for supported values.
string
required
ERC-20 contract address for the base asset (hex string, 20 bytes, no 0x prefix).
string
required
ERC-20 contract address for the quote asset (hex string, 20 bytes, no 0x prefix).

Range Filters (mutually exclusive)

number
Starting block number (inclusive) for the query. Use with to_block.
number
Ending block number (inclusive) for the query. Use with from_block.
string
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with to_timestamp.
string
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with from_timestamp.
Scoping rule: Provide exactly one of:
  1. Block rangefrom_block and to_block
  2. Time rangefrom_timestamp and to_timestamp
  3. Direct selectors — presented below
Direct selectors may be used on their own, without a block or time range. Do not combine scoping modes. Omitting all three returns HTTP 400.

Direct Selectors

number[]
Filter by exchange identifiers. See the DigitalExchange enumeration.
string[]
Restrict to specific BlockDB pool identifiers.

Pagination Controls

number
default:"250"
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
string
Opaque pagination cursor supplied by a previous response.

Decimals-Adjusted Amounts

boolean
default:"false"
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

object
Echo of request metadata applied to the response.
number
EVM chain ID echoed from the request.
string
ERC-20 contract address of the base asset, echoed from the request.
string
ERC-20 contract address of the quote asset, echoed from the request.
object
Pure echo of the window you sent (from_block/to_block/from_timestamp/to_timestamp); unset bounds are null.
object | 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.
number | null
Resolved/echoed start block of the executed window.
number | null
Resolved/echoed end block of the executed window.
string | null
Resolved/echoed start timestamp (ISO-8601) of the executed window.
string | null
Resolved/echoed end timestamp (ISO-8601) of the executed window.
object
Filter parameters echoed from the request.

Data

object[]
Swap print records matching the request.
string
BlockDB pool identifier where the swap occurred.
number
Exchange/DEX identifier.
number
Pool type identifier.
number
Block height where the swap event was observed.
string
UTC timestamp of the block containing the swap.
number
Zero-based transaction index within the block.
number
Zero-based log index within the transaction.
string
20-byte address of the input token (direction of trade).
string
20-byte address of the output token for this swap direction.
string
Amount of token_in executed in the swap, as a raw integer in the token’s smallest denomination. String-encoded to preserve uint256 precision.
string | null
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.
string
Amount of token_out received in the swap, as a raw integer in the token’s smallest denomination. String-encoded to preserve uint256 precision.
string | null
Decimals-adjusted form of amount_out_raw. null when the output token’s decimals are unknown or when include_adjusted_amounts=false.
string | null
Realized execution price: token_out per 1 token_in (decimals-adjusted). May be null.
string
Tracing identifier for the swap print record (hex string, no 0x prefix).
string[]
Parent lineage references (hex strings, no 0x prefix).
string
Record creation timestamp (ISO-8601).
string
Record update timestamp (ISO-8601).

Envelope Fields

string | null
Pagination cursor.
number
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
Last modified on July 19, 2026