Skip to main content
GET
cURL
Get OHLC candles for each outcome token of one market from stored daily price snapshots. Use this endpoint to chart a market over days or weeks.

Read the candles

  • outcomes has one entry per present token, YES first and then NO. Each carries token_id, outcome, and candles.
  • candles is sorted by t, oldest first. t is the bucket start in unix seconds. o, h, l, and c are prices in provider [0, 1] units.
  • resolution is 1d (default) or 1w. 1d buckets by UTC calendar day. 1w buckets by ISO week from Monday 00:00 UTC.
  • Stored data is daily. A 1d bucket usually holds one point, so o, h, l, and c equal that day’s close. A 1w bucket aggregates real OHLC across the daily closes.
  • The API adds no intraday data.
  • from is an exclusive lower bound in unix seconds. to is an inclusive upper bound. With 1w, a mid-week point can produce a candle whose t precedes from.
  • A market with no fetched tokens returns an empty outcomes array with status 200.
  • Open and resolved markets both return candles.

Handle the market ID

  1. Pass the raw condition_id from search or explore, or the mkt_ market ID from any V1 response.
  2. A trd_, wt_, or rf_ prefix returns 400 bad_request with error.param="condition_id".
  3. An unknown market returns 404 not_found.

Cache the candles

The 200 response carries an ETag. Send If-None-Match to get 304 Not Modified with an empty body when nothing changed. Get Market Snapshot returns the current price and top of book for the same market.

Authorizations

Authorization
string
header
required

API key authentication. Send your key in the Authorization header as Bearer oxi_sk_live_.... Live keys require an active Pro subscription and return live data.

Headers

If-None-Match
string

Conditional GET validator from a previous ETag. Matching values return 304 Not Modified with an empty body.

Path Parameters

condition_id
string
required

Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses.

Query Parameters

resolution
enum<string>
default:1d

Bucketing granularity. 1d aggregates by UTC calendar day, 1w by ISO week (Monday 00:00 UTC start). Defaults to 1d.

Available options:
1d,
1w
from
integer<int64>

Exclusive lower bound as a unix timestamp in seconds; points at or before this timestamp are omitted (the underlying daily snapshot read filters bucket_start > from). Note: for resolution=1w a surviving mid-week point can yield a weekly candle whose t (Monday 00:00 UTC) precedes from.

to
integer<int64>

Inclusive upper bound as a unix timestamp in seconds; points after this timestamp are omitted.

Response

Provider-first market candles

object
string
required
Allowed value: "market_candles"
data
object
required

Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from the stored token_price_snapshots series (covers open and resolved markets).

meta
object
required