Skip to main content
Prediction Market data is currently in beta. It is actively being worked on and improved, but may be unreliable. Polymarket data is live, and Kalshi data will be added soon.At least for the time being, this endpoint requires a Growth or Enterprise plan. Learn more.

Returns

Arguments

Example Query

{
  predictionMarketBars(input: {
    marketId: "0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137"
    from: 1772658000
    to: 1773349275
    resolution: day1
  }) {
    bars {
      t
      volumeUsd
      trades
      uniqueTraders
      outcome0 {
        priceUsd {
          o
          h
          l
          c
        }
        volumeUsd
        buyVolumeUsd
        sellVolumeUsd
        liquidityUsd {
          o
          h
          l
          c
        }
      }
      outcome1 {
        priceUsd {
          o
          h
          l
          c
        }
        volumeUsd
        buyVolumeUsd
        sellVolumeUsd
      }
    }
  }
}
Example Response (truncated)
{
  "data": {
    "predictionMarketBars": {
      "bars": [
        {
          "t": 1772582400,
          "volumeUsd": "1073538.078916",
          "trades": 965,
          "uniqueTraders": 337,
          "outcome0": {
            "priceUsd": {
              "o": "0.006",
              "h": "0.008065",
              "l": "0.004",
              "c": "0.005"
            },
            "volumeUsd": "3785.090519",
            "buyVolumeUsd": "2447.47264",
            "sellVolumeUsd": "1337.617879",
            "liquidityUsd": {
              "o": "281814.102498",
              "h": "899479.973067",
              "l": "258871.310908",
              "c": "865147.393041"
            }
          },
          "outcome1": {
            "priceUsd": {
              "o": "0.992977",
              "h": "0.996131",
              "l": "0.991936",
              "c": "0.995994"
            },
            "volumeUsd": "1069752.988397",
            "buyVolumeUsd": "1019145.40634",
            "sellVolumeUsd": "50607.582057"
          }
        },
        // ... 8 more bars
      ]
    }
  }
}

Usage Guidelines

Bar data provides time-series OHLC (Open, High, Low, Close) aggregates for individual prediction markets. Each bar represents a time period and includes comprehensive metrics for both outcomes, including price movements, volume, liquidity, bid/ask spreads, and order book depth. Key characteristics:
  • Market ID formats vary by protocol:
    • Polymarket: <marketAddress>:Polymarket:<exchangeAddress>:<networkId> (e.g., 0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137)
    • Kalshi: <marketSlug>:Kalshi (e.g., KXMVECROSSCATEGORY-S2026A4A05B370DF-F1FBA451AA9:Kalshi)
  • Outcome-level OHLC data: Separate price and liquidity metrics for outcome0 and outcome1
  • Detailed market microstructure: Includes bid/ask prices, spreads, and 2% depth metrics
  • Volume breakdown: Track buys, sells, and total volume in USD, collateral tokens, and shares
  • Time-series format: Each bar has a timestamp (t) representing the period start
  • Multiple resolutions: From 1-minute to 1-week intervals for granular or aggregate analysis

Troubleshooting Tips

In real markets, outcome prices may not sum exactly to 1.00 due to bid/ask spreads, liquidity constraints, and market inefficiencies. The sum typically ranges from 0.98 to 1.02. Large deviations may indicate arbitrage opportunities or data issues.
  • volumeUsd: Trading volume denominated in US dollars
  • volumeShares: Volume measured in outcome token shares
  • volumeCollateralToken: Volume in the market’s collateral token (e.g., USDC)
All three represent the same trading activity in different units. Use USD for cross-market comparison.
Spread = askUsd.c - bidUsd.c for the close of each bar. A wider spread indicates lower liquidity or higher market uncertainty. Monitor spreads to assess market health and trading conditions.
This measures the total USD value of bid orders within 2% of the best bid price. It’s a measure of order book depth and liquidity resilience. Higher values mean the market can absorb larger trades without significant price impact.
Some fields like liquidityUsd, bidUsd, and depth metrics may be null for older data or during periods when orderbook snapshots weren’t available. Always check for null values before processing these fields.
  • o (open): Value at the start of the bar period
  • h (high): Maximum value during the period
  • l (low): Minimum value during the period
  • c (close): Value at the end of the period
For price data, this shows volatility. For liquidity, it shows liquidity fluctuations.
This is the cumulative volume for the market from inception up to the close of this bar. It’s useful for tracking market maturity and total activity. Compare it to volumeUsd in the bar to understand what percentage of total volume occurred in that period.