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 (inclusive). Block ranges use strict containment: only buckets whose entire span maps to blocks within [from_block, to_block] are returned, so each bar aggregates only blocks inside your range. The partial bucket that merely contains from_block (and also spans earlier blocks) is excluded. A range narrower than one bucket_seconds returns no bars. Use with to_block.
number
Ending block (inclusive). The partial bucket that contains to_block (and also spans later blocks) is excluded — only buckets ending at or before to_block’s timestamp are returned. Use with from_block.
string
Window start (ISO-8601, inclusive). Used directly as bucket_start >= from_timestamp. Use with to_timestamp.
string
Window end (ISO-8601, inclusive). Buckets with bucket_end <= to_timestamp are included. 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.

Candle Controls

number
required
Candle width in seconds. Allowed values: 60, 300, 900, 1800, 3600, 14400, 86400.
boolean
default:"false"
Gap-fill: one row per pool per bucket in the requested window. Gap buckets LOCF the last close (flat candle: open=high=low=close), with zero volumes and trades_count=0.Eligible pools have at least one bar for this pair and bucket_seconds on or before the window end (same 0404 table). LOCF seeds from the last bar before the window start when available, then from in-window bars.Works with a timestamp or block range (blocks resolve to timestamps, then align to bucket boundaries).

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.

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[]
OHLC candles matching the request; each object uses the same field names as 0404. When dense=true, one row is returned per pool per bucket for every bucket in the requested window.
string
BlockDB pool identifier for the candle.
number
Exchange/DEX identifier.
number
Pool type identifier.
string
Inclusive UTC start of the candle bucket (ISO-8601).
string
Exclusive UTC end of the candle bucket (ISO-8601). Equal to bucket_start + bucket_seconds.
number
Bucket width in seconds: 60, 300, 900, 1800, 3600, 14400, or 86400.
string | null
Opening price for the bucket (quote_token_address per 1 base_token_address, decimals-adjusted). null only when no prior bar exists for this pool, pair, and bucket_seconds before the window ends.
string | null
Highest price within the bucket. null under the same condition as open.
string | null
Lowest price within the bucket. null under the same condition as open.
string | null
Closing price for the bucket. In dense mode, gap buckets LOCF the last close (including pre-window bars). null only when no LOCF seed exists.
string
Sum of raw UInt256 amountIn values. "0" for carry-forward buckets in dense mode.
string | null
Decimal-adjusted base (base_token_address) volume. null when token decimals are unknown. "0" for carry-forward buckets in dense mode when decimals are known.
string
Sum of raw UInt256 amountOut values. "0" for carry-forward buckets in dense mode.
string | null
Decimal-adjusted quote (quote_token_address) volume. null when token decimals are unknown. "0" for carry-forward buckets in dense mode when decimals are known.
number
Trade count in the bucket. 0 for carry-forward buckets in dense mode.
number | null
First block number in the chain-wide bucket. Populated when dense=true; null in sparse mode.
number | null
Last block number in the chain-wide bucket. Populated when dense=true; null in sparse mode.
string | null
Timestamp of the first block in the chain-wide bucket (ISO-8601). Populated when dense=true; null in sparse mode.
string | null
Timestamp of the last block in the chain-wide bucket (ISO-8601). Populated when dense=true; null in sparse mode.
number | null
Block count in the chain-wide bucket. Populated when dense=true; null in sparse mode.
string | null
BlockDB tracing ID (18-byte hex, exactly 36 characters, no 0x prefix). null for synthetic gap-fill rows when dense=true.
string[] | null
Tracing IDs of contributing swap prints; optional. null for gap-fill rows and by default.
string | null
Record creation timestamp (ISO-8601). null for gap-fill rows.
string | null
Record update timestamp (ISO-8601). null for gap-fill rows.

Envelope Fields

string | null
Pagination cursor.
number
Number of candles returned in this page.

Usage Notes

  • Pair direction is meta.base_token_addressmeta.quote_token_address (token_intoken_out). Row objects do not repeat token addresses.
  • For USD-denominated VWAP buckets, use /evm/prices/spot/fiat/vwap instead of this endpoint.
  • Each row is one pool’s candle for one bucket. Use pool_uids or exchange_ids to narrow results.
  • dense=true works with a timestamp or block range.
Last modified on July 19, 2026