Provides historical OHLCV data for trading pairs or assets with flexible time ranges and price formats for market analysis.
| Parameter | Type | Description |
|---|---|---|
blockchain | string | Blockchain identifier (e.g., "ethereum", "bsc", "solana"). Automatically normalized. |
asset | string | Asset name or identifier. Returns data for the most liquid pair of the asset. |
symbol | string | Token ticker symbol (e.g., "ETH"). Optional, not used when querying by asset. |
address | string | Contract address of the pair or pool. Takes priority over asset and symbol. |
baseToken | string | Contract address of the base token in the pair. Normalized automatically. |
from | number | Start of the timeframe (Unix timestamp in ms). Defaults to 0. |
to | number | End of the timeframe (Unix timestamp in ms). Defaults to current time. |
period | string | Candle resolution. Options: 1s, 5s, 15s, 30s, 1min, 5min, 15min, 1h, 4h, 1d, 7d, 30d. Default: 5m. |
amount | number | Number of candles to return. Defaults to 1000. Overrides from/to if both are set. |
usd | boolean | Price reference mode. true = USD (default), false = base token pricing. |
mode | enum | Data source mode. "pool" (default) returns pool-specific data, "asset" aggregates by asset. |
from and to parameters, coupled with “amount” being set to : to - from / resolution - and filter out manually the data points that are not in the timeframe you want.