Prediction markets API

Who traded one prediction market, and how each trader did on it

The traders of one market ranked by volume, realized PnL or activity, with each one's position, entry price and PnL per outcome.

GET/api/external/prediction/prediction-market-traders/{id}

What it returns

One row per trader on the market, ranked by sort_by, with their totals and a per-outcome breakdown (position, entry price, realized and unrealized PnL). Page with offset. Only venues that settle on-chain keep per-trader records: a market on an off-chain venue, like an unknown id, answers an empty items. There is no total: a page shorter than limit is the last one, and an offset past the end answers an empty items too. isWinningOutcome is set only once the market has resolved.

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-traders/<id>"
Parameters
ParameterDescription
sort_by

query · string · optional

Which figure to rank traders by. Defaults to USD volume.volumeUsdrealizedPnlUsdtradeslastTradeTimestampprofitPerTradeUsd
sort_type

query · string · optional

Sort direction. Defaults to descending.ASCDESC
limit

query · integer · optional

How many rows to return. Defaults to 20; this endpoint caps it at 100. limit ≤ 15 keeps the answer under 32 KB.
offset

query · integer · optional

0-based row offset, for paging through the ranking. At most 1000000.
id

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

Response fields of Who traded one prediction market, and how each trader did on it
FieldTypeDescription
itemsobject[]
items[].traderIdstring | nullA stable id for this trader, the same one prediction-trades rows carry. Pass it as the id of prediction-trader-markets for every market this trader traded.
items[].walletstring | nullThe trader's EVM wallet address. Null when the venue exposes none.
items[].aliasstring | null
items[].labelsstring[]e.g. market-maker, high-frequency-bot. Empty when none.
items[].profileUrlstring | null
items[].profileImageUrlstring | null
items[].hasOpenPositionboolean | null
items[].realizedPnlUsdnumber | nullRealized PnL on this market, USD. A real 0 is possible.
items[].unrealizedPnlUsdnumber | nullUnrealized PnL on the open position, USD.
items[].currentPositionValueUsdnumber | null
items[].volumeUsdnumber | nullTotal USD traded on this market.
items[].volumeSharesnumber | nullShares traded, summed across outcomes.
items[].costBasisUsdnumber | null
items[].sharesHeldnumber | nullShares held now, summed across outcomes — outcomes has the position per outcome.
items[].buysnumber | nullNumber of buy fills.
items[].sellsnumber | nullNumber of sell fills.
items[].tradesnumber | nullNumber of fills, buys plus sells.
items[].pnlPerVolumenumber | nullRealized PnL divided by USD volume, as a fraction (0.0021 is 0.21%).
items[].profitPerTradeUsdnumber | nullRealized PnL divided by trades, USD.
items[].firstTradeTimestampnumber | nullUnix seconds.
items[].lastTradeTimestampnumber | nullUnix seconds.
items[].outcomesobject[]At most one entry per outcome, outcome 0 first (e.g. Yes then No). An outcome with no record is left out, so read label, not the position.
items[].outcomes[].outcomeIdstring | null
items[].outcomes[].labelstring | nulle.g. Yes.
items[].outcomes[].isWinningOutcomeboolean | nullWhether this outcome won, once the market has resolved. Null while it is open, and for a market that ended any other way.
items[].outcomes[].sharesHeldnumber | nullShares of this outcome held now.
items[].outcomes[].avgEntryPriceUsdnumber | nullAverage price paid per share of the shares held now, 0 to 1. Null when none are held.
items[].outcomes[].costBasisUsdnumber | null
items[].outcomes[].buysnumber | nullNumber of buy fills.
items[].outcomes[].sellsnumber | nullNumber of sell fills.
items[].outcomes[].buyVolumeUsdnumber | null
items[].outcomes[].sellVolumeUsdnumber | null
items[].outcomes[].realizedPnlUsdnumber | null
items[].outcomes[].currentPriceUsdnumber | nullThe outcome's current price, 0 to 1. Null once the market has resolved.
items[].outcomes[].currentPositionValueUsdnumber | null
items[].outcomes[].unrealizedPnlUsdnumber | null
items[].outcomes[].pnlStatusstring | nullThe trader's result on this outcome, e.g. WIN, NEUTRAL — WIN is possible on the losing outcome when it was sold at a profit. Open set: new values can appear.
items[].outcomes[].firstTradeTimestampnumber | nullUnix seconds. Null when the trader never traded this outcome.
items[].outcomes[].lastTradeTimestampnumber | nullUnix seconds. Null when the trader never traded this outcome.

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