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

# DetailedPredictionEventStats

> Response returned by `detailedPredictionEventStats`. DetailedPredictionEventStats type reference: every field and its type.

## GraphQL

```
type DetailedPredictionEventStats {
  eventId: String!
  predictionEvent: PredictionEvent!
  predictionMarkets: [PredictionMarket!]!
  lastTransactionAt: Int!
  lifecycle: PredictionLifecycleStats!
  statsMin5: EnhancedWindowedPredictionEventStats
  statsHour1: EnhancedWindowedPredictionEventStats
  statsHour4: EnhancedWindowedPredictionEventStats
  statsHour12: EnhancedWindowedPredictionEventStats
  statsDay1: EnhancedWindowedPredictionEventStats
  statsWeek1: EnhancedWindowedPredictionEventStats
  trendingScores: DetailedPredictionStatsScores!
  relevanceScores: DetailedPredictionStatsScores!
  allTimeStats: PredictionEventAllTimeStats!
}

enum PredictionProtocol {
  POLYMARKET
  KALSHI
}

enum PredictionEventStatus {
  OPEN
  SUSPENDED
  RESOLVED
  CANCELLED
  PENDING
}

type PredictionResolution {
  result: String
  source: String
}

type PredictionSubSubcategory {
  name: String!
  slug: String!
}

type PredictionSubcategory {
  name: String!
  slug: String!
  subcategories: [PredictionSubSubcategory!]
}

type PredictionCategory {
  name: String!
  slug: String!
  subcategories: [PredictionSubcategory!]
}

enum PredictionMetadataType {
  SPORTS
}

type SportsTeam {
  abbreviation: String!
  altAbbreviations: [String!]
  name: String
  league: String
  logo: String
  alias: String
  color: String
  providerId: Int
  isHome: Boolean
}

enum SportsTimezone {
  UTC
}

type KalshiSportsTickerComponents {
  rawTicker: String!
  seriesPrefix: String!
  seriesSport: String
  teamTailRaw: String
  homeAbbreviation: String
  awayAbbreviation: String
}

type DecomposedVenueTicker {
  kalshiSports: KalshiSportsTickerComponents
}

type SportsEventEnrichedMetadata {
  league: String
  teams: [SportsTeam!]
  gameStartDate: String
  gameStartTime: String
  gameStartTimeSeconds: Int
  gameStartTimezone: SportsTimezone
  decomposedVenueTicker: DecomposedVenueTicker
}

type PredictionEventEnrichedMetadata {
  metadataType: PredictionMetadataType!
  sports: SportsEventEnrichedMetadata
}

type PredictionEvent {
  id: String!
  protocol: PredictionProtocol!
  venueEventId: String!
  venueSeriesId: String
  status: PredictionEventStatus!
  question: String!
  url: String!
  rulesPrimary: String!
  rulesSecondary: String
  tags: [String!]!
  opensAt: Int!
  closesAt: Int
  resolvesAt: Int
  resolvedAt: Int
  resolution: PredictionResolution
  imageLargeUrl: String
  imageThumbUrl: String
  imageSmallUrl: String
  createdAt: Int!
  updatedAt: Int!
  networkId: Int
  marketIds: [String!]
  categories: [PredictionCategory!]
  enrichedMetadata: PredictionEventEnrichedMetadata
}

type SportsMarketEnrichedMetadata {
  sportsMarketType: String
  league: String
  teams: [SportsTeam!]
  gameStartDate: String
  gameStartTime: String
  gameStartTimeSeconds: Int
  gameStartTimezone: SportsTimezone
}

type PredictionMarketEnrichedMetadata {
  metadataType: PredictionMetadataType!
  sports: SportsMarketEnrichedMetadata
}

type PredictionMarket {
  id: String!
  protocol: PredictionProtocol!
  venueMarketId: String!
  venueMarketSlug: String
  eventId: String
  venueEventId: String
  question: String
  label: String
  suggestedLabel: String
  eventLabel: String
  rules: String
  rules2: String
  venueOutcomeIds: [String!]!
  outcomeIds: [String!]!
  outcomeLabels: [String!]
  resolution: PredictionResolution
  imageLargeUrl: String
  imageThumbUrl: String
  imageSmallUrl: String
  createdAt: Int
  updatedAt: Int
  opensAt: Int
  closesAt: Int
  resolvesAt: Int
  resolvedAt: Int
  observedAt: Int!
  networkId: Int
  exchangeAddress: String
  categories: [PredictionCategory!]
  winningOutcomeId: String
  enrichedMetadata: PredictionMarketEnrichedMetadata
}

type PredictionLifecycleStats {
  ageSeconds: Int!
  expectedLifespanSeconds: Int
  timeToResolutionSeconds: Int
  isResolved: Boolean!
  winningOutcomeId: String
}

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
}

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 DetailedPredictionStatsScores {
  score5m: Float
  score1: Float
  score4: Float
  score12: Float
  score24: Float
  score1w: Float
}

type PredictionEventAllTimeStats {
  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.


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