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 Queries

Get trending markets ranked by outcome price change
{
  predictionEventTopMarketsBars(input: {
    eventId: "67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137"
    from: 1773347775
    to: 1773349275
    resolution: min15
    limit: 3
    rankByOutcome: outcome0
    rankByOutcomeAttribute: priceChange1h
    rankDirection: DESC
    removeEmptyBars: true
  }) {
    marketBars {
      marketId
      predictionMarket {
        question
        outcomeLabels
      }
      bars {
        t
        volumeUsd
        outcome0 {
          priceUsd {
            o
            h
            l
            c
          }
          liquidityUsd {
            c
          }
        }
      }
    }
  }
}

Example Response

Example response (truncated)
{
  "data": {
    "predictionEventTopMarketsBars": {
      "marketBars": [
        {
          "marketId": "0xdeb615a52cd114e5aa27d8344ae506a72bea81f6ed13f5915f050b615a193c20:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
          "predictionMarket": {
            "question": "Will the Fed decrease interest rates by 50+ bps after the March 2026 meeting?",
            "outcomeLabels": [
              "Yes",
              "No"
            ]
          },
          "bars": [
            {
              "t": 1773347400,
              "volumeUsd": "1291.363323",
              "outcome0": {
                "priceUsd": {
                  "o": "0.002",
                  "h": "0.002",
                  "l": "0.002",
                  "c": "0.002"
                },
                "liquidityUsd": {
                  "c": "7145187.310262"
                }
              }
            },
            {
              "t": 1773348300,
              "volumeUsd": "988.200516",
              "outcome0": {
                "priceUsd": {
                  "o": "0.002",
                  "h": "0.002",
                  "l": "0.002",
                  "c": "0.002"
                },
                "liquidityUsd": {
                  "c": "7138365.20336"
                }
              }
            },
            {
              "t": 1773349200,
              "volumeUsd": "703.948227",
              "outcome0": {
                "priceUsd": {
                  "o": "0.002",
                  "h": "0.002",
                  "l": "0.002",
                  "c": "0.002"
                },
                "liquidityUsd": {
                  "c": "7093679.819347"
                }
              }
            }
          ]
        },
        // ... 2 more markets
      ]
    }
  }
}

Usage Guidelines

This query returns bar data for multiple top markets within a prediction event, combining event context with individual market time-series data. It’s useful for comparing market performance, identifying trending markets, and analyzing multi-market events. Key characteristics:
  • Event ID format: The eventId format varies by platform:
    • Polymarket: <eventSlug>:Polymarket:<exchangeAddress>:<networkId> (e.g., 67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137)
    • Kalshi: <eventSlug>:Kalshi (e.g., KXMVESPORTSMULTIGAMEEXTENDED-S2026350C4EF9BCE:Kalshi)
  • Batch market data: Get bars for up to 10 markets in a single query
  • Flexible ranking: Rank markets by volume, liquidity, trending score, or outcome-specific metrics
  • Complete market context: Each response includes the full market object plus bar data
  • Efficient querying: Better performance than making multiple individual predictionMarketBars calls
  • Time-series format: Same OHLC bar structure as predictionMarketBars
Common use cases:
  • Display multiple markets from an event on a dashboard
  • Compare trading activity across related markets
  • Identify the most active or trending markets within an event
  • Build event overview pages with market-level granularity

Troubleshooting Tips

  • Use rankBy for market-level metrics (e.g., volumeUsd24h, liquidityUsd, uniqueTraders24h)
  • Use rankByOutcome + rankByOutcomeAttribute for outcome-specific metrics (e.g., price changes, outcome-specific volume)
You cannot use both at the same time. Choose based on whether you’re ranking markets by overall activity or by specific outcome performance.
When you provide marketIds, the ranking parameters are ignored and you’ll get bars for exactly those markets. This is useful when you want specific markets but still benefit from the batch query performance. The limit parameter is also ignored in this case.
Possible reasons:
  • The event has fewer markets than your limit
  • Some markets had no activity in the specified time range (when removeEmptyBars: true)
  • Some markets don’t have the ranking attribute you specified (e.g., older markets may not have trending scores)
Check the total number of markets in the event using the predictionEvent query.
  • DESC (descending): Highest values first - use for “top” markets (e.g., highest volume, most liquid)
  • ASC (ascending): Lowest values first - use for “bottom” markets or when looking for lowest spreads, earliest closing times, etc.
Most use cases want DESC to get the top/best markets.
Yes! The ranking only determines which markets are returned. You can rank by outcome0.priceChange1h but still query full data for both outcome0 and outcome1 in your bars selection. The ranking criterion doesn’t limit what data you receive.
The 10-market limit balances comprehensive data with performance. If you need more markets:
  • Make multiple queries with different ranking criteria
  • Use pagination by explicitly specifying different marketIds in subsequent queries
  • Consider whether you truly need more than 10 markets for your UI/analysis
Most dashboards and visualizations work well with 5-10 top markets.