Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.codex.io/llms.txt

Use this file to discover all available pages before exploring further.

Prediction Market data is currently in beta. It is actively being worked on and improved, but may be unreliable. Polymarket and Kalshi data are live.At least for the time being, this endpoint requires a Growth or Enterprise plan. Learn more.
Open trader positions are fully accurate and updated as trades settle on-chain (Polymarket) or via the Kalshi websocket. Both sources are backfilled on reconnect.
This endpoint requires a Growth or Enterprise plan. Learn more.

Returns

PredictionTraderHoldingsConnection
PredictionTraderHoldingsConnection
See PredictionTraderHoldingsConnection

Arguments

input
PredictionTraderHoldingsInput!
required
Input parameters for trader holdings query. See PredictionTraderHoldingsInput

Example

Test this query in the Explorer →
{
  predictionTraderHoldings(
    input: {traderId: "0x492442eab586f242b53bda933fd5de859c8a3782:Polymarket", limit: 10}
  ) {
    items {
      amount
      market {
        label
        createdAt
        closesAt
        categories {
          name
        }
        protocol
        question
        eventId
      }
      tokenId
    }
  }
}

Usage Guidelines

  • Use this endpoint to display a trader’s open positions and market details.
  • Pair with predictionMarketPrice to compute live unrealized PnL on open positions.
  • Works across both Polymarket and Kalshi markets supported by Codex.
  • For historical performance beyond open positions, combine with predictionTraderMarketsStats (data available from ~Feb 2026, when Codex began indexing).

Troubleshooting Tips

Open trader positions are expected to be fully accurate. Polymarket data is derived from Polygon transaction processing. Kalshi data is sourced via Kalshi’s websocket.
No. This endpoint returns current holdings only. For historical trade activity, use the predictionTraderMarketsStats endpoint.
Either the trader has no open positions, or the trader address is from a market we don’t index. Confirm the address is active on a supported venue (Polymarket or Kalshi).
Yes. Combine holdings quantities with the latest predictionMarketPrice result for each market.
  • Prediction Traders: Learn how to build trader leaderboards, profiles, and portfolio analytics for prediction market traders