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.
Prediction Market data is currently in beta. It is actively being worked on and improved, but may be unreliable. Polymarket and Kalshi data are live.At least for the time being, this endpoint requires a Growth or Enterprise plan. Learn more.
This endpoint requires a Growth or Enterprise plan. Learn more.
Returns
See PredictionEventFilterConnection
Show Properties
Show Properties
Total number of matching results.
The current page number.
The list of results.
See PredictionEventFilterResult
Show Properties
Show Properties
The unique identifier.
The unix timestamp.
The timestamp of the last transaction.
Simplified event data from search index. Use predictionEvent for full event details.
See SearchPredictionEvent
Show Properties
Show Properties
The unique identifier.
The venue-specific event ID.
The venue-specific series ID.
The exchange contract address.
The network ID.
The prediction protocol.
See PredictionProtocol
The URL slug.
The question or title.
The description.
Tags associated with this entity.
URL of the thumbnail image.
The venue url.
The creation timestamp.
The timestamp when this entity opens.
The timestamp when this entity closes.
The expected resolution timestamp.
The actual resolution timestamp.
Full prediction event loaded from database. May be null if event no longer exists.
See PredictionEvent
Show Properties
Show Properties
The unique identifier.
The prediction protocol.
See PredictionProtocol
The venue-specific event ID.
The venue-specific series ID.
The question or title.
The external URL.
Primary rules text.
Secondary rules text.
Tags associated with this entity.
The timestamp when this entity opens.
The timestamp when this entity closes.
The expected resolution timestamp.
The actual resolution timestamp.
The resolution details.
See PredictionResolution
URL of the large image.
URL of the thumbnail image.
URL of the small image.
The creation timestamp.
The last update timestamp.
The network ID.
Associated market IDs.
Categories associated with this entity.
See PredictionCategory
Show Properties
Show Properties
Per-domain structured enrichment (sports league/teams/start times today; new domains added over time). Null when no domain-specific signal extracted.
See PredictionEventEnrichedMetadata
Show Properties
Show Properties
Discriminator naming which sub-block carries data.
See PredictionMetadataType
Show Properties
Show Properties
Sports games (league, teams, start times).
Populated when
metadataType = SPORTS.
See SportsEventEnrichedMetadataShow Properties
Show Properties
Soft-normalised league/sport identifier (e.g. NBA, NFL, EPL). Free string to tolerate new venues; well-known values match the canonical set.
Teams participating in the game, when known. Null when the venue does not expose teams.
See SportsTeam
Show Properties
Show Properties
Lowercased venue-canonical abbreviation.
Known alternate forms for the same team (rebrands, relocations, 2-vs-3-letter conventions). Excludes
abbreviation.Display name.
Soft-normalised league for this team.
Logo URL.
Display alias.
Brand colour.
Provider-side identifier (e.g. Polymarket gamma id).
Whether this team is the home team in the event.
Game-start date in UTC (“YYYY-MM-DD”). Derived from
gameStartTime when present.Game-start clock value as canonical UTC ISO-8601.
Game-start as Unix seconds (UTC).
Timezone discriminator for
gameStartTime / gameStartDate. Always UTC for any record produced after the ET→UTC normalisation rollout.
See SportsTimezoneShow Properties
Show Properties
UTC.
gameStartTime is canonical ISO-8601; gameStartTimeSeconds populated.Decomposed venue ticker (parsed components from the venue’s native event identifier). Useful for cross-venue matching when canonical league/teams fields don’t disambiguate.
See DecomposedVenueTicker
Show Properties
Show Properties
Populated for Kalshi events whose ticker matches the sports template.
See KalshiSportsTickerComponents
Show Properties
Show Properties
Original ticker string.
Series prefix (e.g. “KXMLBGAME”).
Soft-normalised series sport.
Raw uppercase team-tail captured from the ticker (e.g. “1WINTUNDRA”). Present when the parser matched the structural shape.
Populated only when the parser can confidently split the team tail.
Populated only when the parser can confidently split the team tail.
The prediction protocol.
See PredictionProtocol
The creation timestamp.
The age.
The expected lifespan.
The timestamp when this entity opens.
The timestamp when this entity closes.
The expected resolution timestamp.
The actual resolution timestamp.
The top markets for this event.
See PredictionEventTopMarket
Show Properties
Show Properties
The unique identifier of the market.
The label.
The label of the outcome 0.
The label of the outcome 1.
The bid CT of the outcome 0.
The bid USD of the outcome 0.
The ask CT of the outcome 0.
The ask USD of the outcome 0.
The bid CT of the outcome 1.
The bid USD of the outcome 1.
The ask CT of the outcome 1.
The ask USD of the outcome 1.
The volume CT of the market in the last 1 day.
The volume USD of the market in the last 1 day.
The volume CT of the market in the last 1 week.
The volume USD of the market in the last 1 week.
The volume CT of the market in all time.
The volume USD of the market in all time.
thumbUrl of the market.
The role of the market.
See PredictionMarketRole
Show Properties
Show Properties
Single-market outright winner (e.g. Polymarket two-outcome moneyline).
One side of a split head-to-head moneyline (typically 2-3 markets per event: per-team Yes/No for a single game/half/quarter/period, plus optional Tie). Group all markets in an event with this role to reconstruct the logical moneyline.
One entrant in a large-field tournament/championship outright (e.g. Kalshi “NBA Champion?” with one Yes/No market per team in the league). Distinct from MONEYLINE_OUTCOME by field size and event shape.
Point spread / handicap.
Over/under total.
Player or team prop.
One bucket of a price-threshold ladder (e.g. “BTC > $80k”).
One bucket of a date ladder (e.g. “Before 2027”).
Exotic market (BTTS, correct score, method of victory, etc.).
Fallback.
The suggested label of the market.
ISO 3166-1 alpha-2 country code when the row is a country entrant (Eurovision, World Cup, Olympics, etc.). Null otherwise. Mirrors
classification.entrant.countryCode from the per-market classification metadata, hoisted onto the top-market row so card clients don’t have to issue a follow-up query just to render a flag.Data for markets.
See PredictionEventFilterResultMarket
Data for marketCount.
Categories associated with this entity.
The resolution source.
The related event ids.
The trending score.
The trending score.
The trending score.
The trending score.
The trending score.
The trending score.
The relevance score.
The relevance score.
The relevance score.
The relevance score.
The relevance score.
The relevance score.
Liquidity in USD.
Liquidity in collateral token units.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
Open interest in USD.
Open interest in collateral token units.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
Volume in USD.
Volume in USD.
Volume in USD.
Volume in USD.
Volume in USD.
Volume in USD.
Volume in USD.
Volume in collateral token units.
The venue volume usd.
The venue volume ct.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The trades5m.
The trades1h.
The trades4h.
The trades12h.
The trades24h.
The trades1w.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The unique traders5m.
The unique traders1h.
The unique traders4h.
The unique traders12h.
The unique traders24h.
The unique traders1w.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The percentage change.
The event shape.
See PredictionEventShape
Show Properties
Show Properties
Single team-vs-team match (e.g. “Lakers vs Celtics”).
Best-of-N series within a tournament (e.g. NBA Finals series, MLB postseason series).
Season/tournament-level championship (e.g. “Pro Basketball Champion?”, Super Bowl winner).
Esports match (e.g. “Dota 2: Aurora vs Heroic”, “CS2: FaZe vs Navi”). Similar market roles to traditional sports (moneyline, totals, props) but distinct event category.
Awards show / cultural competition outright field — typically one Yes/No market per nominee/entrant (e.g. “Eurovision Winner 2026”, Oscars Best Picture, Grammy of the Year).
Election / nomination / primary outright field — typically one Yes/No market per candidate (e.g. “Democratic Presidential Nominee 2028”).
Numeric threshold ladder for a price/value (e.g. “BTC > $X”).
Date-bucket ladder (e.g. “Before Jan 21, 2029”).
FOMC / central-bank rate-decision event.
Single binary yes/no event.
Weather or climate measure ladder (e.g. daily high temperature in °C, one Yes/No market per bucket or tail).
Multi-select / pick-N field where the entrant set is a list of distinct items (policy items, demands, topics) rather than candidates, dates, or numeric buckets (e.g. “What Iranian demands will Trump agree to?”, “What will the bill include?”).
Fallback.
Arguments
A set of filters to apply.
See PredictionEventFilters
Show Properties
Show Properties
The prediction protocol.
See PredictionProtocol
Categories associated with this entity. Mutually exclusive with excludeCategories and hasCategories.
Exclude events with these categories. Mutually exclusive with categories and hasCategories.
Filter by whether the event has any categories. Mutually exclusive with categories and excludeCategories.
The resolution source.
The venue-specific series ID.
The unix timestamp.
See NumberFilter
The timestamp of the last transaction.
See NumberFilter
The creation timestamp.
See NumberFilter
The age.
See NumberFilter
The expected lifespan.
See NumberFilter
The timestamp when this entity opens.
See NumberFilter
The timestamp when this entity closes.
See NumberFilter
The expected resolution timestamp.
See NumberFilter
The actual resolution timestamp.
See NumberFilter
Data for marketCount.
See NumberFilter
The trending score.
See NumberFilter
The trending score.
See NumberFilter
The trending score.
See NumberFilter
The trending score.
See NumberFilter
The trending score.
See NumberFilter
The trending score.
See NumberFilter
The relevance score.
See NumberFilter
The relevance score.
See NumberFilter
The relevance score.
See NumberFilter
The relevance score.
See NumberFilter
The relevance score.
See NumberFilter
The relevance score.
See NumberFilter
Liquidity in USD.
See NumberFilter
Liquidity in collateral token units.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
Open interest in USD.
See NumberFilter
Open interest in collateral token units.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in USD.
See NumberFilter
Volume in collateral token units.
See NumberFilter
The venue volume usd.
See NumberFilter
The venue volume ct.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The trades5m.
See NumberFilter
The trades1h.
See NumberFilter
The trades4h.
See NumberFilter
The trades12h.
See NumberFilter
The trades24h.
See NumberFilter
The trades1w.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The unique traders5m.
See NumberFilter
The unique traders1h.
See NumberFilter
The unique traders4h.
See NumberFilter
The unique traders12h.
See NumberFilter
The unique traders24h.
See NumberFilter
The unique traders1w.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
The percentage change.
See NumberFilter
A phrase to search for. Can match event question, tags, or description.
A list of event IDs to filter by.
A list of event IDs to exclude from results.
A list of ranking attributes to apply.
See PredictionEventRanking
Show Properties
Show Properties
The attribute to rank by.
See PredictionEventRankingAttribute
Show Properties
Show Properties
Score from phrase matching (for search queries)
The sort direction.
See RankingDirection
Deprecated. No longer affects market ordering.
See PredictionEventMarketSort
This field is deprecated. No longer affects market ordering.
The maximum number of events to return.
Where in the list the server should start when returning items.
Example: Top events by 24h volume
{
filterPredictionEvents(
rankings: [
{ attribute: volumeUsd24h, direction: DESC }
]
limit: 10
) {
count
page
results {
id
timestamp
lastTransactionAt
event {
id
venueEventId
protocol
status
question
description
tags
imageThumbUrl
venueUrl
createdAt
opensAt
closesAt
resolvesAt
resolvedAt
}
protocol
status
createdAt
opensAt
closesAt
resolvesAt
resolvedAt
markets {
id
label
}
marketCount
categories
resolutionSource
liquidityUsd
volumeUsdAll
volumeUsd24h
volumeChange24h
trades24h
tradesChange24h
uniqueTraders24h
uniqueTradersChange24h
liquidityChange24h
openInterestUsd
openInterestChange24h
trendingScore24h
relevanceScore24h
}
}
}
Example Response (truncated)
{
"data": {
"filterPredictionEvents": {
"count": 10,
"page": 0,
"results": [
{
"id": "67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
"protocol": "POLYMARKET",
"status": "OPEN",
"categories": [
"economy",
"finance",
"politics",
"sports",
"fed"
],
"marketCount": 4,
"event": {
"question": "Fed decision in March?",
"description": null,
"imageThumbUrl": "https://polymarket-upload.s3.us-east-2.amazonaws.com/jerome+powell+glasses1.png"
},
"liquidityUsd": "32307112",
"volumeUsd24h": "15366655",
"trades24h": 4952,
"uniqueTraders24h": 2536,
"trendingScore24h": 0.33556132554617574,
"opensAt": 1761764679,
"closesAt": 1773792000,
"resolvesAt": 1773792000
}
// ... 9 more results
]
}
}
}
Example: Search events by text
{
filterPredictionEvents(
phrase: "Champions League"
filters: {
status: OPEN
marketCount: { gt: 1 }
}
rankings: [
{ attribute: volumeUsd24h, direction: DESC }
]
limit: 5
) {
count
results {
event {
question
description
}
status
categories
marketCount
liquidityUsd
volumeUsd24h
trendingScore24h
}
}
}
Example: Filter by category and status
{
filterPredictionEvents(
filters: {
categories: ["sports", "basketball"]
status: OPEN
liquidityUsd: { gt: 100000 }
}
rankings: [
{ attribute: trendingScore24h, direction: DESC }
]
limit: 10
) {
count
results {
event {
question
}
categories
marketCount
liquidityUsd
volumeUsd24h
uniqueTraders24h
trendingScore24h
closesAt
}
}
}
Example: Events closing soon
{
filterPredictionEvents(
filters: {
status: OPEN
closesAt: { gte: 1773000000, lte: 1774000000 }
}
rankings: [
{ attribute: closesAt, direction: ASC }
]
limit: 20
) {
count
results {
event {
question
imageThumbUrl
}
marketCount
liquidityUsd
volumeUsd24h
opensAt
closesAt
resolvesAt
}
}
}
Usage Guidelines
- Response limit: 100 events per request (configurable with
limitparameter) - Use
trendingScore24horvolumeUsd24hrankings for discovering active events - Apply quality filters like minimum liquidity (
liquidityUsd: { gt: 10000 }) to focus on liquid events - Use
phraseparameter to search by event question or description - Filter by
status: OPENto exclude resolved/closed events - Use
categoriesfilter to narrow down to specific topics (e.g., “sports”, “politics”, “crypto”) marketCountshows how many individual markets are within the event
Event vs Market Structure
Events are collections of related markets. For example:- Event: “Champions League Final 2026”
- Market 1: “Will Team A win?”
- Market 2: “Will the score be over 2.5 goals?”
- Market 3: “Will there be a penalty?”
filterPredictionEvents to find high-level topics, then drill into individual markets with filterPredictionMarkets.
Event Status Values
See thePredictionEventStatus enum for all possible status values and their meanings.
Scoring Metrics
- trendingScore - Measures what’s “heating up” - prioritizes growth velocity over absolute size (a small event with 10x volume growth scores higher than a large event with flat volume)
- relevanceScore - Measures what “matters” - based on absolute size and capital at stake across all markets, with no growth multipliers (large, established events rank high even if quiet)
- competitiveScore - Measures genuine uncertainty across event markets - higher when prices are near 50%, trading is balanced on both sides, and there’s active price discovery
Troubleshooting Tips
How do I find events with many betting options?
How do I find events with many betting options?
Use the
marketCount filter. Events with higher market counts offer more granular betting options. For example: marketCount: { gt: 5 } will return events with 6+ markets.How do I track event momentum?
How do I track event momentum?
Use the change metrics like
volumeChange24h, liquidityChange24h, and uniqueTradersChange24h. Positive values indicate growth. Combine with trendingScore for events with accelerating activity across multiple markets.Related Recipes
- Discover Prediction Markets: Build filterable, sortable discovery pages for events and markets
- Prediction Event Dashboard: Build a full event detail page with markets, charts, and trades