Skip to main content

Polymarket Sports API

Query sports-related prediction markets on Polymarket: cricket (e.g. via ESPN Cricinfo resolution source), general sports (by description), and esports (by outcome label). Use PredictionManagements for market creation events and PredictionTrades for trading activity. For real-time data, use the same operations as GraphQL subscriptions (change query to subscription) or Kafka streams — see Real-time: GraphQL subscriptions and Kafka below.

API Key Required

To query or stream data outside the Bitquery IDE, you need an API access token. See How to generate Bitquery API token ➤.


How sports markets are identified

FilterUse caseWhere to apply
ResolutionSourceMarkets resolved by a specific source (e.g. espncricinfo.com for cricket)Management.Prediction.Question.ResolutionSource
DescriptionGeneral sports markets (keyword in management description)Management.Description
Outcome labelTrades on outcomes whose label contains a term (e.g. "Esports")Trade.Prediction.Outcome.Label

Real-time: GraphQL subscriptions and Kafka

GraphQL subscriptions

Any query on this page can be run in real time as a subscription: keep the same where filters and requested fields, and change the keyword query to subscription. You receive new events (market creations or trades) as they occur on Polygon via a WebSocket connection.

Kafka streams

For ultra-low-latency and high-throughput consumption, prediction market data (including sports) is also available via Kafka. The same lifecycle events and trades are delivered as Protocol Buffers on Polygon topics:

  • matic.predictions.proto — Raw prediction market events (creations, resolutions, trades)
  • matic.broadcasted.predictions.proto — Mempool prediction market data

Kafka requires separate credentials (IDE tokens do not work). See the full guide and topic list:

For credentials, contact support or email support@bitquery.io.

Latest cricket markets created

Markets resolved via ESPN Cricinfo (ResolutionSource includes espncricinfo.com). Returns the 10 most recent Created events with full condition, outcomes, question, and collateral token details.

Run in Bitquery IDE

query LatestCricketMarketsCreated {
EVM(network: matic) {
PredictionManagements(
limit: { count: 10 }
orderBy: { descending: Block_Time }
where: {
Management: {
EventType: { is: "Created" }
Prediction: {
Question: { ResolutionSource: { includes: "espncricinfo.com" } }
}
}
}
) {
Block {
Time
}
Call {
Signature {
Name
}
}
Log {
Signature {
Name
}
SmartContract
}
Management {
Description
EventType
Prediction {
CollateralToken {
Name
SmartContract
Symbol
AssetId
}
Condition {
Id
Oracle
Outcomes {
Id
Index
Label
}
QuestionId
}
Marketplace {
ProtocolName
ProtocolFamily
SmartContract
}
Outcome {
Id
Index
Label
}
OutcomeToken {
Symbol
SmartContract
Name
AssetId
}
Question {
CreatedAt
Id
Image
MarketId
ResolutionSource
Title
}
}
}
Transaction {
From
Hash
}
}
}
}

Latest sports markets created

Markets whose management description includes the word "sports". Use this for broad sports coverage beyond a single resolution source. Returns the 10 most recent Created events.

Run in Bitquery IDE

query LatestSportsMarketsCreated {
EVM(network: matic) {
PredictionManagements(
limit: { count: 10 }
orderBy: { descending: Block_Time }
where: {
Management: {
EventType: { is: "Created" }
Description: { includes: "sports" }
}
}
) {
Block {
Time
}
Call {
Signature {
Name
}
}
Log {
Signature {
Name
}
SmartContract
}
Management {
Description
EventType
Prediction {
CollateralToken {
Name
SmartContract
Symbol
AssetId
}
Condition {
Id
Oracle
Outcomes {
Id
Index
Label
}
QuestionId
}
Marketplace {
ProtocolName
ProtocolFamily
SmartContract
}
Outcome {
Id
Index
Label
}
OutcomeToken {
Symbol
SmartContract
Name
AssetId
}
Question {
CreatedAt
Id
Image
MarketId
ResolutionSource
Title
}
}
}
Transaction {
From
Hash
}
}
}
}

Latest esports prediction trades

Recent trades where the outcome label includes "Esports". Returns up to 50 trades ordered by block time, with buyer, seller, amounts, price, and full prediction/question metadata.

Run in Bitquery IDE

query LatestEsportsPredictionTrades {
EVM(network: matic) {
PredictionTrades(
limit: { count: 50 }
orderBy: { descending: Block_Time }
where: {
TransactionStatus: { Success: true }
Trade: { Prediction: { Outcome: { Label: { includes: "Esports" } } } }
}
) {
Block {
Time
}
Call {
Signature {
Name
}
}
Log {
Signature {
Name
}
SmartContract
}
Trade {
OutcomeTrade {
Buyer
Seller
Amount
CollateralAmount
CollateralAmountInUSD
OrderId
Price
PriceInUSD
IsOutcomeBuy
}
Prediction {
CollateralToken {
Name
Symbol
SmartContract
AssetId
}
ConditionId
OutcomeToken {
Name
Symbol
SmartContract
AssetId
}
Marketplace {
SmartContract
ProtocolVersion
ProtocolName
ProtocolFamily
}
Question {
Title
ResolutionSource
Image
MarketId
Id
CreatedAt
}
Outcome {
Id
Index
Label
}
}
}
Transaction {
From
Hash
}
}
}
}

Polymarket-only filter

To restrict results to Polymarket only, add this to the relevant where clause:

PredictionManagements:

Management: {
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
# ... other filters
}

PredictionTrades:

Trade: {
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
# ... other filters
}

NeedAPI
Market lifecycle (creation, resolution)Prediction Managements API
Trades, volume, pricesPrediction Trades API
Filter by slug, condition ID, tokenPolymarket Markets API
Polymarket overviewPolymarket API
Settlements & redemptionsPrediction Settlements API
User & wallet activityPolymarket Wallet & User Activity API
Real-time: GraphQL subscriptionsGraphQL subscriptions & WebSockets
Real-time: Kafka streamsKafka Streaming Concepts

Support