Prediction markets API

One prediction-market outcome's live order book

What is resting on one outcome's book right now, bid and ask. A different question from who already holds the outcome token.

GET/api/external/prediction/prediction-outcome-order-book/{id}

What it returns

Bid and ask price levels for one outcome, addressed by the id from a market's own outcomeIds (GET /prediction/prediction-market). A timestamp of null means no book is indexed for this outcome, not a real book with zero depth.

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-outcome-order-book/<id>"
Parameters
ParameterDescription
id

path · string · required

A prediction-market outcome id (one of a market's two outcomes) — 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 outcome's live order book
FieldTypeDescription
outcomeIdstring | null
protocolstring | nullThe venue this outcome trades on, e.g. "POLYMARKET" or "KALSHI".
timestampnumber | nullUnix seconds this book was observed at. Null when no book is indexed for this outcome.
bookLiquidityUsdnumber | nullTotal liquidity currently in this book, USD.
bidsobject[]
bids[].pricenumber | null
bids[].sizenumber | null
asksobject[]
asks[].pricenumber | null
asks[].sizenumber | 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