For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/market-data/get-candles.md.
Get OHLC candles for a symbol
Returns open/high/low/close buckets for an asset over a configurable lookback window, sampled at a configurable resolution. Use for candlestick charts and volatility measures that need the intra-bucket range rather than a single close.
Only sources that store individual ticks can produce OHLC. Requesting
candles for an asset priced from a derived or snapshot source returns
400. Hyperliquid perps are stored as mids, so their candles come
from Hyperliquid's own trade OHLC instead, at any resolution that is
a whole number of minutes, hours or days.
See the Time Window & Resolution
section for the format of window and resolution.
asset_id?stringBackend asset ID. Mutually exclusive with symbol: exactly one of
the two is required, and naming both is a 400.
uuidsymbol?stringDeprecatedAsset symbol to fetch candles for (e.g. SOL, BTC).
window?stringLookback period (e.g. 1h, 4h, 1d, 7d, 1M).
"1h"as_of?stringEnds the window at this instant instead of now, so a past period can be read. RFC3339, and not the zero time. A future instant bounds a window that is still filling. Absent reads live data.
date-timeresolution?stringCandle size (e.g. 1m, 5m, 1h).
"5s"asset_class?stringAsset class to resolve the symbol in. Defaults to spot.
"spot""spot""perp"Candle series for the requested symbol
application/json- response
asset_id?stringBackend asset ID. Absent on the CeFi routes.
uuidsymbol?stringThe asset symbol
window?stringThe time window used for the query
resolution?stringThe candle size used for the query
candles?array<>List of OHLC buckets, oldest first
curl -X GET 'https://api.truemarkets.co/v1/defi/market/prices/candles'{ "asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4", "symbol": "string", "window": "string", "resolution": "string", "candles": [ { "t": "string", "open": "string", "high": "string", "low": "string", "close": "string", "volume": "string" } ]}Get min/max price over a window GET
Returns the minimum and maximum price observed for an asset within a configurable lookback window, along with the timestamps at which each extreme occurred. Useful for surfacing 24h highs/lows or computing period-over-period statistics.
Get price history for an asset GET
Returns historical price points for an asset over a configurable lookback window, sampled at a configurable resolution.