Market Data
OHLCV
Query venue-published OHLCV updates over REST or derive UTC-aligned bars with the SDK.
GET
OHLCV
Use
SDK historical methods can reuse standardized local files. See SDK historical replay for storage and gap-handling behavior, trade events for the source data, and the event envelope for nested OHLCV events.
GET /ohlcv to read venue-published candle updates, including updates to an open candle. Several REST rows can share the same candle interval and open time. The SDK’s ohlcv() method instead derives one UTC-aligned bar per interval from standardized trades; see SDK-derived bars.
Request
Query parameters
Access and behavior
start and end are inclusive candle open times in Unix milliseconds, not collector times. Rows are ordered by candle open time with stable event tie-breakers. With no bounds, the API queries windows opened in the latest hour anonymously; older windows require a Polaris API key. interval is an exact canonical value such as 1m or 1h. Anonymous reads are capped at 1 GiB per request and two concurrent queries per API replica.
Response
items[] fields
These are flat, venue-published observations. They are not the SDK’s aggregated trade bars.
REST pagination
Passnext_cursor as cursor with the same filters. Stop when has_more is false, or when next_cursor is null for endpoints without has_more. A cursor is opaque; do not edit or reuse it with different filters.
REST errors
The OpenAPI contract lists400, 401, 422, 429, 503. Error responses use error.code, error.message, and error.resolution. Narrow an expensive query after 422. Follow Retry-After after 429.
For the machine-readable contract, see the OpenAPI document.
SDK-derived bars
Useclient.ohlcv() when you need interval-aligned bars derived from standardized trade data. Boundaries are fixed to UTC intervals, which makes cross-venue joins reproducible. The SDK’s to bound is exclusive, while the REST end bound is inclusive.
Method and parameters
The default result is a list of bars with
timestamp (UTC Unix milliseconds at bar open), open, high, low, close, volume (traded base volume), trades (trade count), and interval. Unlike the REST response, these bars are calculated from standardized trades. When a bar appears in an SDK event stream, its fields live under the standard event envelope’s data object.
TradingView output
Passformat="tradingview" to receive candles[] and volumes[] instead of bar dictionaries. Each candles[] entry has time in Unix seconds and open, high, low, and close; each volumes[] entry has time in Unix seconds and value for bar volume.