Skip to main content
Use client.ohlcv() when you want interval-based bar data instead of raw executions. This method aggregates OHLCV bars from standardized trade data. OHLCV data is interval-aligned and deterministic: candle boundaries are fixed to UTC intervals, which keeps joins and cross-venue aggregation consistent.

Method signature

Parameters

Return value

  • Default: List of OHLCV bar dictionaries
  • With format="tradingview": Dictionary with candles and volumes arrays

Example response

Fields

The default response is a list of bar dictionaries with these fields:
  • timestamp: bar open time in UTC milliseconds since the Unix epoch
  • open, high, low, close: interval prices
  • volume: traded base volume for the bar
  • trades: number of trades aggregated into the bar
  • interval: duration token such as 1m, 5m, or 1h
When OHLCV appears inside snapshot files or the events stream, it uses the standard event envelope and the bar-specific fields live under the nested data object.

Example

TradingView format

If you pass format="tradingview", the response uses these fields:
  • candles[].time: Unix seconds
  • candles[].open, candles[].high, candles[].low, candles[].close
  • volumes[].time: Unix seconds
  • volumes[].value: bar volume

How it works

client.ohlcv() aggregates bars from standardized trade data using snapshot-first replay. See Snapshots for the full flow.