Prediction markets API
What is a prediction market's open interest, and how many holders and trades?
Contracts open right now and lifetime volume (Kalshi), or lifetime volume, distinct holders and trade count (Polymarket), for one market. Counts, not USD.
/api/external/prediction/prediction-market-open-interest/{id}What it returns
openInterest is the number of contracts open right now, each paying $1 if its outcome wins; volume is the lifetime amount traded, in contracts on kalshi and in outcome shares on polymarket. Neither is a USD figure. What each venue publishes differs: a kalshi market has openInterest and volume but no holders or trades (always null); a polymarket market has volume, holders and trades but no openInterest (null, with openInterestUnavailableReason saying why). holders counts distinct wallets that have held one of the outcome tokens, not only those holding now. A closed market keeps its last figures. asOf is when the figures were last updated and can be hours old while stale is false. An id of neither venue's shape is a 400; a well-formed one no market has is 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-open-interest/<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 |
|---|---|---|
marketId | string | The market id, as passed. |
venue | string | The venue the market trades on. |
openInterest | number | null | Contracts open right now, each paying $1 if its outcome wins. Not USD. Null on polymarket. |
volume | number | null | Lifetime amount traded: contracts on kalshi (whole numbers), outcome shares on polymarket (fractional). Not USD. |
holders | integer | null | Distinct wallets that have held an outcome token of this market, including those that no longer do. Null on kalshi. |
trades | integer | null | Lifetime number of trades. Null on kalshi. |
asOf | string | null | When the figures were last updated, ISO 8601 UTC. Null when unknown. |
stale | boolean | null | True when the figures are known to be out of date; null when unknown. |
estimated | boolean | null | True when the figures are an estimate rather than a reading; null when unknown. |
openInterestUnavailableReason | string | null | Why openInterest is null, as a snake_case code, e.g. official_open_interest_not_indexed. Open set. Null whenever openInterest is published. |
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