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.
/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>"
| Parameter | Description |
|---|---|
idpath · 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.
| Field | Type | Description |
|---|---|---|
outcomeId | string | null | |
protocol | string | null | The venue this outcome trades on, e.g. "POLYMARKET" or "KALSHI". |
timestamp | number | null | Unix seconds this book was observed at. Null when no book is indexed for this outcome. |
bookLiquidityUsd | number | null | Total liquidity currently in this book, USD. |
bids | object[] | |
bids[].price | number | null | |
bids[].size | number | null | |
asks | object[] | |
asks[].price | number | null | |
asks[].size | number | 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