Prediction markets API
One prediction market's state and live outcome prices
One market: its lifecycle, windowed stats and the live price of each outcome. How that price MOVED over a window is a separate read.
/api/external/prediction/prediction-market/{id}What it returns
One market's full detail, addressed by the id from GET /prediction/prediction-markets. This is a DIFFERENT universe from the rest of this API: the id here is never a token mint or contract address. A well-formed but unrecognised id returns every field null rather than a 404.
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/<id>"
| Parameter | Description |
|---|---|
idpath · 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.
| Field | Type | Description |
|---|---|---|
id | string | null | |
protocol | string | null | The venue this market trades on, e.g. "POLYMARKET" or "KALSHI". |
eventId | string | null | The event this market belongs to, or null for a standalone market. |
question | string | null | |
label | string | null | A short label for this market within its event, when it has a parent event. |
outcomeIds | string[] | null | The two outcome ids — pass one to GET /prediction/prediction-outcome-order-book. |
outcomeLabels | string[] | null | |
categories | object[] | null | |
categories[].name | string | null | |
categories[].slug | string | null | |
categories[].subcategories | unknown[] | null | |
resolution | object | null | Null until the market resolves. |
resolution.result | string | null | |
resolution.source | string | null | |
createdAt | number | null | Unix seconds this market was created. |
opensAt | number | null | Unix seconds the market opened for trading. |
closesAt | number | null | Unix seconds trading closes. |
resolvesAt | number | null | Expected resolution time, Unix seconds. |
resolvedAt | number | null | Actual resolution time, Unix seconds — null while unresolved. |
networkId | number | null | The on-chain settlement network id (e.g. 137 for Polygon/Polymarket) — null for a Kalshi market, which has none. |
exchangeAddress | string | null | The on-chain exchange contract, when this market settles on-chain. |
winningOutcomeId | string | null | Null until the market resolves. |
lifecycle | object | |
lifecycle.ageSeconds | number | null | |
lifecycle.expectedLifespanSeconds | number | null | |
lifecycle.timeToResolutionSeconds | number | null | |
lifecycle.isResolved | boolean | null | |
lifecycle.winningOutcomeId | string | null | |
allTimeVolumeUsd | number | null | Lifetime trading volume, USD. |
statsHour1 | object | |
statsHour1.volumeUsd | number | null | Trading volume over the window, USD. |
statsHour1.trades | number | null | Number of trades over the window. |
statsHour1.uniqueTraders | number | null | Distinct trading accounts over the window — null on venues that do not report it (measured: Kalshi). |
statsDay1 | object | |
statsDay1.volumeUsd | number | null | Trading volume over the window, USD. |
statsDay1.trades | number | null | Number of trades over the window. |
statsDay1.uniqueTraders | number | null | Distinct trading accounts over the window — null on venues that do not report it (measured: Kalshi). |
priceObservedAt | number | null | Unix seconds the outcome prices below were observed at. |
outcomePrices | object[] | One entry per outcome. Empty for an unrecognised market id. |
outcomePrices[].outcomeId | string | null | |
outcomePrices[].lastTradePriceUsd | number | null | Last traded price, USD (0-1 for a binary market). |
outcomePrices[].bestBidUsd | number | null | Best resting bid, USD — null when there is none (a literal "0" in the source data is read as absent, never a real zero price). |
outcomePrices[].bestAskUsd | number | null | Best resting ask, USD — null when there is none, same reasoning as bestBidUsd. |
outcomePrices[].bookLiquidityUsd | number | null | Liquidity currently backing the order book for this outcome, USD. |
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