Skip to main content

Description

The Pricing Suite for spot crypto delivers depth curves, price-impact grids, OHLC bars, VWAP, and LWAP for ERC-20 pairs on EVM chains. All pricing data is derived from verified on-chain trades and normalized for consistent cross-venue analysis.

Endpoint Matrix

EndpointSummaryDataset IDTypical Latency
POST /evm/prices/spot/erc20-erc20/depthOrderbook-style depth curves for ERC-20 pairs0401< 200 ms
POST /evm/prices/spot/erc20-erc20/impact-gridPrice impact estimates across notional sizes0402< 250 ms
POST /evm/prices/spot/erc20-erc20/ohlcOHLC candlestick bars with volume aggregation0404< 200 ms
POST /evm/prices/spot/erc20-erc20/vwapVolume-weighted average prices over custom windows0501< 200 ms
POST /evm/prices/spot/erc20-erc20/lwapLiquidity-weighted average prices across depth bands0502< 200 ms

Parameter Conventions

chain_id
number
required
Target EVM chain. See the Chain enumeration for supported values.
base_token_address
string
required
Base ERC-20 contract address (hex string, 20 bytes, no 0x prefix).
quote_token_address
string
required
Quote ERC-20 contract address (hex string, 20 bytes, no 0x prefix).

Range Filters (mutually exclusive)

from_block
number
Starting block number (inclusive). Use with to_block.
to_block
number
Ending block number (inclusive). Use with from_block.
from_timestamp
string
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with to_timestamp.
to_timestamp
string
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with from_timestamp.
Validation rule: provide either a block range or a time range. Supplying both returns HTTP 400. Supplying neither returns HTTP 400.

Direct Selectors

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

Metric Controls (per endpoint)

  • Depth: depth_offset_bps (basis-point offset from mid).
  • Impact Grid: grid_step_bps, grid_radius_bps.
  • OHLC: aggregation_interval (required), aggregation_timezone (default UTC).
  • VWAP/LWAP: optional aggregation_interval (defaults server-side).

Pagination

All spot crypto endpoints support pagination via limit (recommended default 250, max 1000) and cursor. See Pagination & Limits.

Pricing Layers

L1 (Depth): Raw orderbook depth curves from individual pools
  • Use for: Real-time liquidity analysis, execution routing
L2 (Impact Grid): Venue-aggregated price impact across notional sizes
  • Use for: Trade sizing, slippage estimation
L3 (OHLC): Consolidated candlestick bars across all venues
  • Use for: Charting, technical analysis, backtesting
Analytics (VWAP/LWAP): Volume and liquidity-weighted averages
  • Use for: Execution benchmarking, fair value estimation

Usage Guidance

  • Choose the right layer — L1 for granular analysis, L3 for aggregated views, analytics for execution
  • Filter by exchange — Use exchange_ids to compare prices across DEX protocols
  • Cache catalog responses — Available markets change infrequently; cache for 1-24 hours
  • Use appropriate intervals — Match aggregation intervals to your analysis needs (1m for intraday, 1d for historical)

Common Patterns

Discover available markets:
{
  "chain_id": 1
}
Get OHLC bars for an ERC-20 pair:
{
  "chain_id": 1,
  "base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "from_timestamp": "2025-01-01T00:00:00Z",
  "to_timestamp": "2025-01-31T23:59:59Z",
  "aggregation_interval": "1d",
  "aggregation_timezone": "UTC",
  "limit": 250,
  "cursor": null
}
Calculate VWAP for execution benchmarking:
{
  "chain_id": 1,
  "base_token_address": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "quote_token_address": "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "from_block": 18930000,
  "to_block": 18939999,
  "exchange_ids": [1, 2],
  "limit": 250,
  "cursor": null
}

Dataset Relationships

  • Reserves → Prices: Reserve snapshots drive L1 depth calculations
  • Transactions → Prices: Trade execution logs feed into VWAP/LWAP analytics
  • Pools → Prices: Pool metadata enables venue-specific price filtering

See Also