For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get price history

GET /api/v1/market-data/prices/history

Get price history

get

Returns a historical price series for a single outcome token — the last traded price, step-held between trades (built from the outcome's on-chain trades). Every mode includes the market seed's carried-forward bootstrap price before the outcome's first genuine trade, so young markets chart a line from market open. Two modes: Duration mode (default): control the lookback with duration (bucket size is chosen for you); start_ts filters results after fetch. Range mode (pass interval): step-fills buckets at the given interval over the explicit [start_ts, end_ts] window for zoomable line charts. The first point is anchored from the last trade (or seed) before start_ts (so adjacent windows connect) or, if the market did not exist yet, the series begins at the seed. A window that would exceed ~10k buckets is rejected unless changes_only=true. changes_only auto mode (changes_only=true): returns the real price change points for the window (start_ts/end_ts, or end_tsduration if no start_ts); interval is ignored. Resolution scales with trade density — sparse outcomes return exact change points, very active outcomes read the close price from a pre-aggregated bucket so the chart stays cheap and renderable. Capped at fidelity else ~1000 points. Use fidelity in either mode to cap the number of points (downsampled if exceeded).

Query parameters
marketstringRequired

Market contract address

token_idstringOptional

Outcome token ID (provide token_id or outcome_index, not both)

outcome_indexintegerOptional

Outcome index, 0-based (provide token_id or outcome_index, not both)

intervalstring · enumOptional

Bucket interval (range mode, changes_only=false). IGNORED when changes_only=true — that mode auto-picks resolution by trade density.

Possible values:
durationstring · enumOptional

Lookback duration (duration mode, default 24h)

Possible values:
end_tsintegerOptional

End unix timestamp (default: now)

start_tsintegerOptional

Range mode: window start (required). Duration mode: filters results after fetch.

fidelityintegerOptional

Max data points returned — downsamples if the window contains more

changes_onlybooleanOptional

Return only step edges — drop flat gap-filled buckets where price/payout/collateral/minted_quantity are unchanged (default false; for step-rendered charts)

Responses
200

OK

application/json

Historical price series.

outcomeNamestringOptional
get/api/v1/market-data/prices/history

Last updated