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

# EnhancedWindowedPredictionEventStats

> Enhanced stats for a prediction event over a time window. EnhancedWindowedPredictionEventStats type reference: every field and its type.

## GraphQL

```
type EnhancedWindowedPredictionEventStats {
  start: Int!
  end: Int!
  lastTransactionAt: Int!
  core: WindowedPredictionEventCoreStats!
  buySell: WindowedPredictionEventBuySellStats
  uniqueTraders: WindowedPredictionEventUniqueTraderStats
  liquidity: WindowedPredictionEventLiquidityStats
  openInterest: WindowedPredictionEventOpenInterestStats
  statsChange: WindowedPredictionEventChangeStats!
  scores: PredictionEventWindowScores!
  allTimeStats: WindowedPredictionAllTimeStats!
}

type CurrencyValuePair {
  usd: String!
  ct: String!
}

type WindowedPredictionEventCoreStats {
  volume: CurrencyValuePair!
  trades: Int!
}

type WindowedPredictionEventBuySellStats {
  buyVolume: CurrencyValuePair!
  sellVolume: CurrencyValuePair!
}

type WindowedPredictionEventUniqueTraderStats {
  uniqueTraders: Int!
}

type CurrencyOHLC {
  open: CurrencyValuePair!
  close: CurrencyValuePair!
  low: CurrencyValuePair!
  high: CurrencyValuePair!
}

type WindowedPredictionEventLiquidityStats {
  liquidity: CurrencyOHLC!
}

type WindowedPredictionEventOpenInterestStats {
  openInterest: CurrencyOHLC!
}

type WindowedPredictionEventChangeStats {
  volumeChange: Float!
  tradesChange: Float!
  buyVolumeChange: Float
  sellVolumeChange: Float
  uniqueTradersChange: Float
  liquidityChange: Float
  openInterestChange: Float
}

type PredictionEventWindowScores {
  trending: Float!
  relevance: Float!
  competitive: Float!
}

type WindowedPredictionAllTimeStats {
  volume: CurrencyValuePair!
  venueVolume: CurrencyValuePair
}
```

### Used By

**Returned by**

* [detailedPredictionEventStats](https://docs.codex.io/api-reference/queries/detailedpredictioneventstats.md): Returns windowed and all-time stats for a prediction event.
* [onDetailedPredictionEventStatsUpdated](https://docs.codex.io/api-reference/subscriptions/ondetailedpredictioneventstatsupdated.md): Streams updated detailed stats for a specific prediction event.


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