Prediction markets API

One prediction market's OHLC-style bars over a bounded window

The priced series for one market over a bounded window, in OHLC-style bars. A different question from the market's state: how the price moved, not what it is.

GET/api/external/prediction/prediction-market-bars/{id}

What it returns

Per-bucket probability (0-1), volume and trade-count bars for one market, addressed by the id from GET /prediction/prediction-markets. Bounded by from/to (Unix seconds) and capped at 1000 bars per request.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/prediction/prediction-market-bars/<id>?resolution=min1&from=<from>&to=<to>"
Parameters
ParameterDescription
resolution

query · string · required

The bucket width.min1min5min15min30hour1hour4hour12day1week1
from

query · integer · required

Window start, Unix seconds (inclusive).
to

query · integer · required

Window end, Unix seconds (inclusive). Per market, a window of ≤ 90 bars keeps the answer under 32 KB; a batch keeps markets × bars ≤ 80.
id

path · string · required

A prediction-market id, e.g. "<marketAddress>:Polymarket:<exchangeAddress>:<networkId>" or "<slug>:Kalshi" — not a token mint or contract address, and not scoped to any chain this API otherwise supports.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of One prediction market's OHLC-style bars over a bounded window
FieldTypeDescription
marketIdstring | null
barsobject[]
bars[].tnumber | nullBucket open time, Unix seconds.
bars[].volumeUsdnumber | nullVolume across both outcomes in this bucket, USD.
bars[].uniqueTradersnumber | null
bars[].tradesnumber | null
bars[].allTimeVolumeUsdnumber | nullCumulative lifetime volume as of this bucket, USD.
bars[].outcome0object | null
bars[].outcome0.tradesnumber | null
bars[].outcome0.volumeUsdnumber | null
bars[].outcome0.priceUsdobject | null
bars[].outcome0.priceUsd.onumber | null
bars[].outcome0.priceUsd.hnumber | null
bars[].outcome0.priceUsd.lnumber | null
bars[].outcome0.priceUsd.cnumber | null
bars[].outcome1object | null
bars[].outcome1.tradesnumber | null
bars[].outcome1.volumeUsdnumber | null
bars[].outcome1.priceUsdobject | null
bars[].outcome1.priceUsd.onumber | null
bars[].outcome1.priceUsd.hnumber | null
bars[].outcome1.priceUsd.lnumber | null
bars[].outcome1.priceUsd.cnumber | null

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key