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.

GET/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>"
Parameters
ParameterDescription
limit

query · integer · optional

How many fills to return, newest first. Defaults to 25; at most 100. limit ≤ 40 keeps the answer under 32 KB.
id

path · 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.

Response fields of One prediction-market trader's newest buys and sells
FieldTypeDescription
traderIdstringThe trader id, as passed.
tradesobject[]The newest fills, most recent first. Empty when no fill is recorded for the trader.
trades[].idstringThis fill's id: the transaction hash and the log index, <txHash>:<logIndex>.
trades[].txHashstring | nullThe on-chain transaction hash of the fill.
trades[].timestampnumberUnix seconds, when the fill happened.
trades[].sidestringWhat the trader did with the outcome token: buy or sell.
trades[].pricenumberPrice per share, 0 to 1.
trades[].quantitynumberShares traded.
trades[].outcomeIndexnumber | nullWhich outcome of the market was traded (0-indexed). Null on a combination.
trades[].outcomeLabelstring | nullThe outcome traded, e.g. Yes, Under, a team name. Null on a combination.
trades[].tokenIdstringThe outcome token traded, the venue's own token id (a long decimal).
trades[].conditionIdstring | nullThe market's on-chain condition id (0x…). Null on a combination, which has none.
trades[].marketTitlestring | nullThe market's title.
trades[].marketSlugstring | nullThe market's URL slug.
trades[].groupItemTitlestring | nullThe sub-market label inside a multi-market event, e.g. O/U 187.5. Null when the market has none.
trades[].eventIdstring | nullThe venue's own id for the event this market belongs to. Null on a combination.
trades[].eventTitlestring | nullThe event's title.
trades[].eventSlugstring | nullThe event's URL slug.
trades[].isComboboolean | nulltrue 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