Prediction markets API
Latest trades and redemptions on one prediction market
The tape of one market: who traded which outcome, at what price and size, newest first, with redemptions once it resolves.
/api/external/prediction/prediction-trades/{id}What it returns
Newest first, cursor-paged. Keep paging while nextCursor is non-null: a page can hold fewer rows than limit and still not be the last. On-chain venues report each fill once per side (a BUY row and a SELL_COUNTERPARTY row, each with its own wallet), so summing every row double-counts volume. Resolved markets add redemption rows (POSITION_REDEEMED, PAYOUT_REDEMPTION) with no outcome and no price; their amountUsd can be a real 0. Off-chain venues have no wallet, traderId or transactionHash. An unknown id answers an empty items.
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-trades/<id>"
| Parameter | Description |
|---|---|
limitquery · integer · optional | How many rows to return. Defaults to 20; this endpoint caps it at 100. limit ≤ 50 keeps the answer under 32 KB. |
cursorquery · string · optional | An opaque cursor from a previous response's nextCursor, for paging to older trades. |
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 |
|---|---|---|
nextCursor | string | null | Pass back as cursor to fetch older trades. Null on the last page. |
items | object[] | |
items[].timestamp | number | null | Unix seconds. |
items[].tradeType | string | null | e.g. BUY, SELL_COUNTERPARTY, TRADE, POSITION_REDEEMED, PAYOUT_REDEMPTION. Open set: new values can appear. |
items[].outcomeId | string | null | The outcome traded. Null on a redemption row. |
items[].outcomeLabel | string | null | e.g. Yes, No: Buffalo. Null on a redemption row. |
items[].outcomeIndex | number | null | |
items[].priceUsd | number | null | Price per outcome share, 0 to 1. |
items[].shares | number | null | Outcome shares traded. |
items[].amountUsd | number | null | USD value of the row. A real 0 is possible (a losing position redeemed). |
items[].wallet | string | null | The wallet on this side of the fill. Null on off-chain venues. |
items[].traderId | string | null | A trader id for the wallet, when the venue has one — the id prediction-trader-markets takes. |
items[].transactionHash | string | null | Null on off-chain venues. |
items[].transactionId | string | null | The venue's own trade id, when it has one. |
items[].blockNumber | number | null | |
items[].networkId | number | null | EVM chain id of the venue, e.g. 137. Null on off-chain venues. |
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