Markets

Get market OHLC price candles

Changed on

Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from the stored token_price_snapshots series (the same series the market-detail chart renders; covers open and resolved markets). Because the stored data is daily, a 1d bucket typically carries one point so its open/high/low/close all equal that day's close; 1w aggregates real OHLC across the observed daily closes. No intraday fidelity is fabricated. Query field names and recognized values are URL-decoded; duplicate recognized fields use the last value and unknown fields are ignored. When both bounds are present, from must be less than or equal to to; malformed or inverted bounds answer 400.

get/api/v1/market/{condition_id}/candles

Request

Path parameters

condition_idstring 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'1d' | '1w'

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

frominteger

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.

tointeger

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.

Headers

X-Query-Validation'strict'

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.

If-None-Matchstring

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

Response

Provider-first market candles

object'market_candles' required

Changes

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • warning

      added the new freshness_ceiling_unsatisfied enum value to the / response property for the response status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status

    • warning

      added the new export_expired enum value to the / response property for the response status