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

# PredictionMarketBarsResponse

> Response returned by `predictionMarketBars`. PredictionMarketBarsResponse type reference: every field and its type.

## GraphQL

```
type PredictionMarketBarsResponse {
  marketId: String!
  predictionMarket: PredictionMarket!
  predictionEvent: PredictionEvent!
  bars: [PredictionMarketBar!]!
}

enum PredictionProtocol {
  POLYMARKET
  KALSHI
}

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

enum PredictionEventStatus {
  OPEN
  SUSPENDED
  RESOLVED
  CANCELLED
  PENDING
}

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 PredictionMarketBarOhlc {
  o: String!
  h: String!
  l: String!
  c: String!
}

type PredictionOutcomeBar {
  venueOutcomeId: String!
  trades: Int
  buys: Int
  sells: Int
  volumeShares: String
  buyVolumeShares: String
  sellVolumeShares: String
  volumeUsd: String
  buyVolumeUsd: String
  sellVolumeUsd: String
  volumeCollateralToken: String
  buyVolumeCollateralToken: String
  sellVolumeCollateralToken: String
  priceUsd: PredictionMarketBarOhlc
  priceCollateralToken: PredictionMarketBarOhlc
  liquidityUsd: PredictionMarketBarOhlc
  liquidityCollateralToken: PredictionMarketBarOhlc
  bidUsd: PredictionMarketBarOhlc
  bidCollateralToken: PredictionMarketBarOhlc
  askUsd: PredictionMarketBarOhlc
  askCollateralToken: PredictionMarketBarOhlc
  twoPercentBidDepthUsd: PredictionMarketBarOhlc
  twoPercentBidDepthCollateralToken: PredictionMarketBarOhlc
  twoPercentAskDepthUsd: PredictionMarketBarOhlc
  twoPercentAskDepthCollateralToken: PredictionMarketBarOhlc
}

type PredictionMarketBar {
  t: Int!
  volumeUsd: String
  volumeCollateralToken: String
  volumeShares: String
  uniqueTraders: Int
  lastEventTimestamp: Int
  trades: Int
  allTimeVolumeUsd: String
  allTimeVenueVolumeUsd: String
  allTimeVolumeCollateralToken: String
  allTimeVenueVolumeCollateralToken: String
  openInterestUsd: PredictionMarketBarOhlc
  outcome0: PredictionOutcomeBar
  outcome1: PredictionOutcomeBar
}
```

### Used By

**Returned by**

* [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.