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

# PredictionEvent

> A prediction event containing one or more markets. PredictionEvent type reference: every field and its type.

## GraphQL

```
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
}

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
}
```

### 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.
* [filterPredictionEvents](https://docs.codex.io/api-reference/queries/filterpredictionevents.md): Filters prediction events using optional text, IDs, and ranking criteria.
* [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.


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