Prediction markets API
One prediction-market trader's newest buys and sells
What one prediction-market trader just bought and sold, fill by fill, newest first: price, shares, the outcome, and the market and event of each. Polymarket traders only.
/api/external/prediction/prediction-trader-trades/{id}What it returns
The trader's most recent fills — each buy or sell of an outcome token — newest first, with the price, the shares, the outcome, and the market and event they belong to. Only the newest 100 are reachable: there is no cursor, and older fills cannot be reached today. Splits, merges and redemptions are not included. The id is a traderId from prediction-trades or prediction-market-traders rows, a wallet and its venue, e.g. 0x…:Polymarket — copy it as given. Only polymarket traders have a trade history here: any other id is a 400. A trader with no recorded fill answers an empty list.
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-trader-trades/<id>"
| Parameter | Description |
|---|---|
limitquery · integer · optional | How many fills to return, newest first. Defaults to 25; at most 100. limit ≤ 40 keeps the answer under 32 KB. |
idpath · string · required | A prediction-market trader id, e.g. "<walletAddress>:Polymarket", as traderId in prediction-trades and prediction-market-traders rows — not a bare wallet 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 |
|---|---|---|
traderId | string | The trader id, as passed. |
trades | object[] | The newest fills, most recent first. Empty when no fill is recorded for the trader. |
trades[].id | string | This fill's id: the transaction hash and the log index, <txHash>:<logIndex>. |
trades[].txHash | string | null | The on-chain transaction hash of the fill. |
trades[].timestamp | number | Unix seconds, when the fill happened. |
trades[].side | string | What the trader did with the outcome token: buy or sell. |
trades[].price | number | Price per share, 0 to 1. |
trades[].quantity | number | Shares traded. |
trades[].outcomeIndex | number | null | Which outcome of the market was traded (0-indexed). Null on a combination. |
trades[].outcomeLabel | string | null | The outcome traded, e.g. Yes, Under, a team name. Null on a combination. |
trades[].tokenId | string | The outcome token traded, the venue's own token id (a long decimal). |
trades[].conditionId | string | null | The market's on-chain condition id (0x…). Null on a combination, which has none. |
trades[].marketTitle | string | null | The market's title. |
trades[].marketSlug | string | null | The market's URL slug. |
trades[].groupItemTitle | string | null | The sub-market label inside a multi-market event, e.g. O/U 187.5. Null when the market has none. |
trades[].eventId | string | null | The venue's own id for the event this market belongs to. Null on a combination. |
trades[].eventTitle | string | null | The event's title. |
trades[].eventSlug | string | null | The event's URL slug. |
trades[].isCombo | boolean | null | true on a combination of several outcomes bought as one. Null on every other fill — never false. |
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