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

# DetailedSubscriptionPredictionMarketStats

> Payload for `onDetailedPredictionMarketStatsUpdated`.

<div data-generated>
  ## GraphQL

  ```
  type DetailedSubscriptionPredictionMarketStats {
    marketId: String!
    lastTransactionAt: Int!
    lifecycle: PredictionLifecycleStats!
    statsMin5: EnhancedWindowedPredictionMarketStats
    statsHour1: EnhancedWindowedPredictionMarketStats
    statsHour4: EnhancedWindowedPredictionMarketStats
    statsHour12: EnhancedWindowedPredictionMarketStats
    statsDay1: EnhancedWindowedPredictionMarketStats
    statsWeek1: EnhancedWindowedPredictionMarketStats
    trendingScores: DetailedPredictionStatsScores!
    relevanceScores: DetailedPredictionStatsScores!
    competitiveScores: DetailedPredictionStatsScores!
    allTimeStats: PredictionMarketAllTimeStats!
  }

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

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

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

  type WindowedPredictionMarketUniqueTraderStats {
    uniqueTraders: Int!
  }

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

  type WindowedPredictionMarketLiquidityStats {
    liquidity: CurrencyOHLC!
  }

  type WindowedPredictionMarketOpenInterestStats {
    openInterest: CurrencyOHLC!
  }

  type WindowedPredictionMarketChangeStats {
    volumeChange: Float!
    tradesChange: Float!
    uniqueTradersChange: Float
    liquidityChange: Float
    openInterestChange: Float
  }

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

  type OutcomeVolumeStats {
    usd: String!
    ct: String!
    shares: String!
  }

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

  type PriceOHLC {
    open: PriceValuePair!
    close: PriceValuePair!
    low: PriceValuePair!
    high: PriceValuePair!
  }

  type WindowedPredictionOutcomeCoreStats {
    venueOutcomeId: String!
    trades: Int!
    volume: OutcomeVolumeStats!
    price: PriceOHLC!
  }

  type OutcomeBuySellVolumeStats {
    usd: String!
    ct: String!
    shares: String!
  }

  type WindowedPredictionOutcomeBuySellStats {
    buys: Int!
    sells: Int!
    buyVolume: OutcomeBuySellVolumeStats!
    sellVolume: OutcomeBuySellVolumeStats!
  }

  type WindowedPredictionOutcomeLiquidityStats {
    liquidity: CurrencyOHLC!
  }

  type WindowedPredictionOutcomeOrderbookStats {
    bid: PriceOHLC!
    ask: PriceOHLC!
  }

  type WindowedPredictionOutcomeDepthStats {
    bidDepth: CurrencyOHLC!
    askDepth: CurrencyOHLC!
  }

  type WindowedPredictionOutcomeChangeStats {
    volumeChange: Float!
    volumeSharesChange: Float!
    priceChange: Float!
    tradesChange: Float!
    priceRange: Float!
    buysChange: Float
    sellsChange: Float
    liquidityChange: Float
  }

  type EnhancedWindowedPredictionOutcomeStats {
    core: WindowedPredictionOutcomeCoreStats!
    buySell: WindowedPredictionOutcomeBuySellStats
    liquidity: WindowedPredictionOutcomeLiquidityStats
    orderbook: WindowedPredictionOutcomeOrderbookStats
    depth: WindowedPredictionOutcomeDepthStats
    statsChange: WindowedPredictionOutcomeChangeStats!
  }

  type WindowedPredictionAllTimeStats {
    volume: CurrencyValuePair!
    venueVolume: CurrencyValuePair
  }

  type EnhancedWindowedPredictionMarketStats {
    start: Int!
    end: Int!
    lastTransactionAt: Int!
    core: WindowedPredictionMarketCoreStats!
    uniqueTraders: WindowedPredictionMarketUniqueTraderStats
    liquidity: WindowedPredictionMarketLiquidityStats
    openInterest: WindowedPredictionMarketOpenInterestStats
    statsChange: WindowedPredictionMarketChangeStats!
    scores: PredictionMarketWindowScores!
    outcome0Stats: EnhancedWindowedPredictionOutcomeStats!
    outcome1Stats: EnhancedWindowedPredictionOutcomeStats!
    allTimeStats: WindowedPredictionAllTimeStats!
  }

  type DetailedPredictionStatsScores {
    score5m: Float
    score1: Float
    score4: Float
    score12: Float
    score24: Float
    score1w: Float
  }

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

  ### Used By

  **Returned by**

  * [onDetailedPredictionMarketStatsUpdated](/api-reference/subscriptions/ondetailedpredictionmarketstatsupdated.md): Streams updated detailed stats for a specific prediction market.
</div>
