Skip to main content
GET
cURL
Use this endpoint to chart a market’s price history. It builds daily or weekly candles from stored daily prices and covers both open and resolved markets. For current prices and the best bid and ask, use Market snapshot.

Parameters

When you send both bounds, from must be less than or equal to to. An inverted range returns 400 with error.param set to from. Sending the two equal is fine. from and to must be in Unix seconds, not milliseconds. A value above 100000000000 (about the year 5138) returns 400 with error.param set to the offending parameter; the most common cause is passing JavaScript’s Date.now(), which returns milliseconds. The server URL-decodes the query names and the values of resolution, from, and to, so a percent-encoded value works. Sending one of those names twice uses the last value. Unknown names are ignored and reported in the X-Query-Ignored response header.

Key response fields

The stored data is daily. A 1d bucket usually holds a single point, so its o, h, l, and c all equal that day’s close. A 1w bucket aggregates real open, high, low, and close across the daily closes it covers.

Example

What it does not return

  • Intraday candles. The stored history has daily resolution.
  • Volume per candle. A candle carries t, o, h, l, and c, and nothing else.
  • An error for a market whose tokens have not been fetched yet. That is a 200 with an empty outcomes array.
  • A 404 for a malformed id. An id the server cannot parse returns 400 instead. Only a well-formed id that names no stored market returns 404.

Caching

Save the response’s ETag and send it in If-None-Match on your next request. If the series has not changed, the server returns 304 Not Modified with no body.

Authorizations

Authorization
string
header
required

Legacy default or named integration API key, or OAuth 2.1 access token, in the Authorization header as Bearer oxi_sk_live_... or Bearer oxi_at_.... Default keys retain full access; integration keys are limited to their approved read, webhooks, export and usage scopes and expire within 90 days. All credentials share the owner's account limits. Data calls require an active Pro subscription and return live data. A 401 carries WWW-Authenticate: Bearer resource_metadata="https://api.0xinsider.com/.well-known/oauth-protected-resource" (RFC 6750 section 3, RFC 9728).

Headers

X-Query-Validation
enum<string>

Opt into strict query-name validation. The default is compatible: unknown names are ignored and reported in X-Query-Ignored. With strict, an unknown name returns 400 bad_request with error.reason unknown_query_parameter before the handler runs, including when its percent escape is incomplete.

Available options:
strict
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 URL-decoded unix timestamp in seconds; points at or before this timestamp are omitted (the underlying daily snapshot read filters bucket_start > from). If to is also present, from must be less than or equal to to. 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 URL-decoded unix timestamp in seconds; points after this timestamp are omitted. If from is also present, from must be less than or equal to to.

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