In this recipe we’ll show you how to discover top prediction market traders, display detailed trader profiles with performance stats, show their market positions and P&L, and chart their trading activity over time.
Prediction market traders have rich on-chain performance data: win rate, P&L, volume, position sizing, and per-market breakdowns. This recipe covers 5 queries that work together: discover traders → view profile → see positions → chart performance → trade history.
Prediction market traders have rich on-chain performance data: win rate, P&L, volume, position sizing, and per-market breakdowns. This recipe covers 5 queries that work together: discover traders → view profile → see positions → chart performance → trade history.
Step 1: Trader Leaderboard
Build a sortable trader leaderboard with performance metrics across configurable time windows using
filterPredictionTraders.Top all-time profitable traders
Top all-time profitable traders
Best win rate this week (minimum volume filter)
Best win rate this week (minimum volume filter)
Highest 24h PnL
Highest 24h PnL
Search for a trader
Search for a trader
Ranking attributes are available at multiple windows: 12h, 24h, 1w, 1m, and “All” (all-time).Volume filters (e.g.,
totalVolumeUsdAll: { gte: 10000 }) are essential for meaningful leaderboards. Filter out low-activity traders.P&L per volume (pnlPerVolumeAll) normalizes profit by capital deployed, making it better for comparing traders of different sizes.Search matches against alias, primary address, or venue trader ID.Step 2: Trader Profile & Detailed Stats
Fetch comprehensive stats for a single trader, broken down by time window, using
detailedPredictionTraderStats.Grab the trader ID from the previous queries to use here. We’ve used a sample trader ID for this example. Feel free to change it.
Full trader profile with windowed stats
Full trader profile with windowed stats
- The
traderobject has the all-time aggregate profile: total volume, profit, biggest win/loss, trade count, active markets - Windowed stats (
statsHour1throughstatsDay30) give recent performance breakdowns statsCurrencyhas all the monetary metrics,statsNonCurrencyhas counts,statsChangehas period-over-period changesheldTokenAcquisitionCostUsd/soldTokenAcquisitionCostUsdshow the cost basis of currently held and already-sold positionsrealizedProfitPercentageis the return on capital for the window- Use the windowed stats to build a time-period toggle (1h, 4h, 12h, 24h, 1w, 30d) on the trader profile
Step 3: Trader’s Market Positions
Show which markets a trader is active in, their positions, and per-market P&L with
filterPredictionTraderMarkets.Grab the trader ID, market ID, or event ID from the previous queries to use here. Or use the corresponding
filterPredictionMarkets, filterPredictionEvents, or filterPredictionTraders queries to find relevant IDs.Open positions sorted by P&L
Open positions sorted by P&L
Top traders for a specific market
Top traders for a specific market
Top traders in a specific event
Top traders in a specific event
Per-outcome position data: Each result has
outcome0 and outcome1 with shares held, avg entry price, cost basis, realized P&L.hasOpenPosition: Filter to show only active positions vs historical ones.pnlStatus: Indicates the P&L state for the outcome (e.g., PROFIT, LOSS).avgEntryPriceCT: The average price the trader paid. Compare with current market price to estimate unrealized P&L.Cross-referencing: Use marketIds to find top traders for a market, or eventIds for an event. This powers “Top Traders” tabs on market/event pages.predictionTraderMarketsStats as a simpler alternative for fetching a trader’s per-market stats without the filtering/ranking system:Grab the trader ID from the previous queries to use here. We’ve used a sample trader ID for this example. Feel free to change it.
Simple position list with predictionTraderMarketsStats
Simple position list with predictionTraderMarketsStats
Step 4: Trader Performance Charts
Chart a trader’s performance over time (volume, P&L, trade activity, and cumulative profit) using
predictionTraderBars.Grab the trader ID from the previous queries to use here. We’ve used a sample trader ID for this example. Feel free to change it.
Trader performance bars
Trader performance bars
Chart types from this data:Cumulative P&L (line chart, the hero chart):
- Plot
cumulativeRealizedPnlCTover time. This is the signature trader performance chart - Shows the running total of realized profit/loss
- Color the line green when positive, red when negative
realizedPnlUsdper bar. Green bars for profit, red for loss- Pair with the cumulative line above for a combo chart
volumeUsdor split intobuyVolumeUsd/sellVolumeUsd
winsandlossesper bar. Stacked or grouped bars showing resolution outcomes
trades,buys,sells: trade frequencyuniqueMarkets: how diversified the trader is per period
Step 5: Trader’s Trade History
Show the individual trade-by-trade history for a trader with
predictionTrades.Grab the trader ID from the previous queries to use here. We’ve used a sample trader ID for this example. Feel free to change it.
Trader trade history
Trader trade history
- Returns individual trades with full context: market, outcome, price, size, direction
tradeTypeindicates BUY or SELLoutcomeLabelshows which outcome was traded (e.g., “Yes” or “No”)priceCollateralis the price paid per shareamountis the number of shares,amountUsdis the USD valuecursorenables pagination for loading more trades- Include
predictionMarketto show market context alongside each trade
Putting It All Together
Here’s the recommended data flow: For a trader profile page, on page load (parallel queries):detailedPredictionTraderStats: profile header, summary stats, windowed performancefilterPredictionTraderMarkets(traderIds, hasOpenPosition: true): active positions tablepredictionTraderBars: cumulative P&L chart
filterPredictionTraderMarkets(traderIds): all positions (when user switches to “All Positions” tab)predictionTrades(traderId): trade history (when user switches to “Trades” tab)
filterPredictionTraders: the main ranked list with configurable sort- Click a trader → navigate to their profile using the data flow above
Check out the related endpoints in their respective API reference pages: