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.

GET/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>"
Parameters
ParameterDescription
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 state and live outcome prices
FieldTypeDescription
idstring | null
protocolstring | nullThe venue this market trades on, e.g. "POLYMARKET" or "KALSHI".
eventIdstring | nullThe event this market belongs to, or null for a standalone market.
questionstring | null
labelstring | nullA short label for this market within its event, when it has a parent event.
outcomeIdsstring[] | nullThe two outcome ids — pass one to GET /prediction/prediction-outcome-order-book.
outcomeLabelsstring[] | null
categoriesobject[] | null
categories[].namestring | null
categories[].slugstring | null
categories[].subcategoriesunknown[] | null
resolutionobject | nullNull until the market resolves.
resolution.resultstring | null
resolution.sourcestring | null
createdAtnumber | nullUnix seconds this market was created.
opensAtnumber | nullUnix seconds the market opened for trading.
closesAtnumber | nullUnix seconds trading closes.
resolvesAtnumber | nullExpected resolution time, Unix seconds.
resolvedAtnumber | nullActual resolution time, Unix seconds — null while unresolved.
networkIdnumber | nullThe on-chain settlement network id (e.g. 137 for Polygon/Polymarket) — null for a Kalshi market, which has none.
exchangeAddressstring | nullThe on-chain exchange contract, when this market settles on-chain.
winningOutcomeIdstring | nullNull until the market resolves.
lifecycleobject
lifecycle.ageSecondsnumber | null
lifecycle.expectedLifespanSecondsnumber | null
lifecycle.timeToResolutionSecondsnumber | null
lifecycle.isResolvedboolean | null
lifecycle.winningOutcomeIdstring | null
allTimeVolumeUsdnumber | nullLifetime trading volume, USD.
statsHour1object
statsHour1.volumeUsdnumber | nullTrading volume over the window, USD.
statsHour1.tradesnumber | nullNumber of trades over the window.
statsHour1.uniqueTradersnumber | nullDistinct trading accounts over the window — null on venues that do not report it (measured: Kalshi).
statsDay1object
statsDay1.volumeUsdnumber | nullTrading volume over the window, USD.
statsDay1.tradesnumber | nullNumber of trades over the window.
statsDay1.uniqueTradersnumber | nullDistinct trading accounts over the window — null on venues that do not report it (measured: Kalshi).
priceObservedAtnumber | nullUnix seconds the outcome prices below were observed at.
outcomePricesobject[]One entry per outcome. Empty for an unrecognised market id.
outcomePrices[].outcomeIdstring | null
outcomePrices[].lastTradePriceUsdnumber | nullLast traded price, USD (0-1 for a binary market).
outcomePrices[].bestBidUsdnumber | nullBest 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[].bestAskUsdnumber | nullBest resting ask, USD — null when there is none, same reasoning as bestBidUsd.
outcomePrices[].bookLiquidityUsdnumber | nullLiquidity 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