Messages
Pricing Suite - Crypto
Spot OHLC
Subscribe to real-time OHLC candlestick bars from on-chain AMM swap aggregates (0404).
WSS
Documentation Index
Fetch the complete documentation index at: https://docs.blockdb.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
- Dataset ID:
0404 - Token-to-Token OHLC - Description: Time-bucketed OHLC bars (1m..1d) per pool and token pair direction.
- Sample: Hugging Face Sample
Subscription 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).Candle width, expressed as an ISO-8601 duration shorthand (
1m, 5m, 1h, 1d). Default is 1m.Message Fields (data)
Top-level fields: chain_id, dataset_id, is_reorg, data (object). The data object mirrors b0404_token_to_token_prices_ohlc_v1:
BYTEA — Pool id (hex).INTEGERINTEGERTIMESTAMPTZ — Inclusive UTC bucket start.TIMESTAMPTZ — Exclusive UTC bucket end (bucket_start + bucket_seconds).INTEGERBYTEABYTEANUMERIC(78,18)NUMERIC(78,18)NUMERIC(78,18)NUMERIC(78,18)NUMERIC(78,0) — Sum of raw UInt256 amountIn values.NUMERIC(78,18) — Decimal-adjusted token_in volume; null if decimals unknown.NUMERIC(78,0) — Sum of raw UInt256 amountOut values.NUMERIC(78,18) — Decimal-adjusted token_out volume; null if decimals unknown.BIGINTBYTEABYTEA[] — Optional parent lineage references.TIMESTAMPTZTIMESTAMPTZSubscription Example
Response Example
Messages
Last modified on May 27, 2026