Prediction markets API

Many prediction markets' state and live outcome prices

Up to 25 prediction markets in one request: each one's lifecycle, windowed stats and the live price of each outcome.

POST/api/external/prediction/prediction-market-batch

What it returns

The prediction-market answer for many markets in one request, addressed by the ids from GET /prediction/prediction-markets. Each result is exactly what prediction-market answers for that market, with the same caveats on every field — including the all-null answer for a well-formed id nobody recognises, which is a result, not an error. POST, because the list is the subject: it can run past what a URL comfortably holds, and a body keeps a watch list out of every proxy log between the caller and this service.

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 -X POST -H "x-dex-data-key: $DEXDATA_API_KEY" \
  -H "content-type: application/json" \
  -d '{"subjects":["<subjects>"]}' \
  "https://api.dexdata.io/api/external/prediction/prediction-market-batch"
Parameters
ParameterDescription
subjects

body · string[] · optional

Prediction market ids — never a token mint or contract address. Between 1 and 25, each sent once.

Response fields

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

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

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