> ## 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.

# PredictionProtocol

> The prediction protocol or venue. Reference for the PredictionProtocol enum in the Codex API: every value and where it is accepted.

## GraphQL

```
enum PredictionProtocol {
  POLYMARKET
  KALSHI
}
```

### Used By

**Returned by**

* [detailedPredictionEventStats](https://docs.codex.io/api-reference/queries/detailedpredictioneventstats.md): Returns windowed and all-time stats for a prediction event.
* [detailedPredictionMarketStats](https://docs.codex.io/api-reference/queries/detailedpredictionmarketstats.md): Returns windowed and all-time stats for a prediction market.
* [detailedPredictionTraderStats](https://docs.codex.io/api-reference/queries/detailedpredictiontraderstats.md): Returns windowed and all-time stats for a prediction trader.
* [eventScopedFilterPredictionMarkets](https://docs.codex.io/api-reference/queries/eventscopedfilterpredictionmarkets.md): Filters prediction markets within a single event and returns structured classification metadata for each market. Use this instead of `filterPredictionMarkets` when you need entrant/segment/ladder details (country codes, period+stat grouping, parsed numeric/date rungs) without re-parsing labels client-side.
* [filterPredictionEvents](https://docs.codex.io/api-reference/queries/filterpredictionevents.md): Filters prediction events using optional text, IDs, and ranking criteria.
* [filterPredictionMarkets](https://docs.codex.io/api-reference/queries/filterpredictionmarkets.md): Filters prediction markets using optional text, IDs, event constraints, and ranking criteria.
* [filterPredictionTraderMarkets](https://docs.codex.io/api-reference/queries/filterpredictiontradermarkets.md): Filters trader-market records using trader, market, event, and ranking criteria.
* [filterPredictionTraders](https://docs.codex.io/api-reference/queries/filterpredictiontraders.md): Filters prediction traders using optional text, IDs, and ranking criteria.
* [onPredictionTradesCreated](https://docs.codex.io/api-reference/subscriptions/onpredictiontradescreated.md): Streams new prediction trades as they are ingested.
* [predictionEventBars](https://docs.codex.io/api-reference/queries/predictioneventbars.md): Returns bar data for a prediction event.
* [predictionEventTopMarketsBars](https://docs.codex.io/api-reference/queries/predictioneventtopmarketsbars.md): Returns bar data for top markets inside a prediction event.
* [predictionMarketBars](https://docs.codex.io/api-reference/queries/predictionmarketbars.md): Returns OHLC-style bar data for a prediction market.
* [predictionMarkets](https://docs.codex.io/api-reference/queries/predictionmarkets.md): Returns prediction markets by ID.
* [predictionOutcomeOrderBooks](https://docs.codex.io/api-reference/queries/predictionoutcomeorderbooks.md): Returns live order books for a set of prediction outcomes, fetched from the venue's CLOB. Polymarket and Kalshi; outcomes from other venues will return null. Cached for up to 10s.
* [predictionTokenHolders](https://docs.codex.io/api-reference/queries/predictiontokenholders.md): Returns token holder balances for a prediction market.
* [predictionTraderBars](https://docs.codex.io/api-reference/queries/predictiontraderbars.md): Returns bar data for a prediction trader over a time range.
* [predictionTraderHoldings](https://docs.codex.io/api-reference/queries/predictiontraderholdings.md): Returns all prediction token holdings for a specific trader.
* [predictionTraderMarketsStats](https://docs.codex.io/api-reference/queries/predictiontradermarketsstats.md): Returns per-market performance stats for a specific trader.
* [predictionTraders](https://docs.codex.io/api-reference/queries/predictiontraders.md): Returns prediction traders by ID.
* [predictionTrades](https://docs.codex.io/api-reference/queries/predictiontrades.md): Returns prediction trades with cursor-based pagination.

**Used as input by**

* [eventScopedFilterPredictionMarkets](https://docs.codex.io/api-reference/queries/eventscopedfilterpredictionmarkets.md): Filters prediction markets within a single event and returns structured classification metadata for each market. Use this instead of `filterPredictionMarkets` when you need entrant/segment/ladder details (country codes, period+stat grouping, parsed numeric/date rungs) without re-parsing labels client-side.
* [filterPredictionEvents](https://docs.codex.io/api-reference/queries/filterpredictionevents.md): Filters prediction events using optional text, IDs, and ranking criteria.
* [filterPredictionMarkets](https://docs.codex.io/api-reference/queries/filterpredictionmarkets.md): Filters prediction markets using optional text, IDs, event constraints, and ranking criteria.
* [filterPredictionTraderMarkets](https://docs.codex.io/api-reference/queries/filterpredictiontradermarkets.md): Filters trader-market records using trader, market, event, and ranking criteria.
* [filterPredictionTraders](https://docs.codex.io/api-reference/queries/filterpredictiontraders.md): Filters prediction traders using optional text, IDs, and ranking criteria.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.