Pulling Prematch Odds
This integration scenario walks from an empty integration to a full prematch market board for a game, using the Sport Event Markets feed and the discovery feeds around it.
This scenario is commonly used to:
- Display a full odds board for an upcoming game across multiple sportsbooks
- Compare current prices to opening prices and track line movement
- Feed a best-price or line-shopping view
- Capture closing lines for settled events
Overview
The Prematch package covers main markets: money lines, spreads and handicaps, totals, and their period splits (halves, quarters, and innings). A typical integration discovers the slate for a date, pulls the market board per event, and then polls the change log to refresh only the events that moved.
Daily Schedules → Sport Event Markets → Change Log loop
Relevant Feeds
| Feed | Purpose |
|---|---|
| Books | The bookmakers configured for your key |
| Sports | Sport IDs and their type |
| Sport Competitions | Competitions with odds, with availability flags |
| Daily Schedules | The events with odds for a sport and date |
| Sport Event Markets | The full market board for one event |
| Sport Event Markets Change Log | Events whose odds changed in the last five minutes |
Competition Schedules and Daily Sport Event Markets variants also exist for competition-scoped and day-batched pulls.
High-Level Workflow
Integration Steps
1. Discover Your Coverage
Call Books and Sports once and cache them (see API Basics for both). Then list the competitions for your sport and check the markets flag:
{
"generated_at": "2026-07-20T16:30:12+00:00",
"competitions": [
{
"id": "sr:competition:109",
"name": "MLB",
"gender": "men",
"markets": true,
"futures": true,
"player_props": true,
"category": {
"id": "sr:category:16",
"name": "USA",
"country_code": "USA"
}
}
]
}markets: true confirms prematch coverage for MLB; futures and player_props flag the other packages' coverage for the same competition.
2. Pull the Slate for a Date
Daily Schedules returns the events with odds for a sport and date. The date is UTC and the response covers that date and the following one, so a late US game appears under two consecutive dates and an evening slate can span both; key events on their ID rather than on the date you queried:
GET https://api.sportradar.com/oddscomparison-prematch/trial/v2/en/sports/sr:sport:3/schedules/2026-07-21/schedules.json
x-api-key: YOUR_API_KEY{
"generated_at": "2026-07-20T16:30:17+00:00",
"schedules": [
{
"sport_event": {
"id": "sr:sport_event:63301085",
"start_time": "2026-07-21T00:05:00+00:00",
"start_time_confirmed": true,
"status": "not_started",
"competitors": [
{
"id": "sr:competitor:3627",
"name": "Chicago Cubs",
"country": "USA",
"country_code": "USA",
"abbreviation": "CHC",
"qualifier": "home",
"rotation_number": 922
},
{
"id": "sr:competitor:3648",
"name": "Detroit Tigers",
"country": "USA",
"country_code": "USA",
"abbreviation": "DET",
"qualifier": "away",
"rotation_number": 921
}
]
}
},
{
"sport_event": {
"id": "sr:sport_event:63302855",
"start_time": "2026-07-21T00:05:00+00:00",
"start_time_confirmed": true,
"status": "not_started",
"competitors": [
{
"id": "sr:competitor:3647",
"name": "Texas Rangers",
"country": "USA",
"country_code": "USA",
"abbreviation": "TEX",
"qualifier": "home",
"rotation_number": 916
},
{
"id": "sr:competitor:3644",
"name": "Chicago White Sox",
"country": "USA",
"country_code": "USA",
"abbreviation": "CWS",
"qualifier": "away",
"rotation_number": 915
}
]
}
}
]
}The response is trimmed here to the first two events. The list sits under the schedules key, and the feed paginates (start, limit up to 50; check X-Max-Results). Events appear here when odds become available, so this is the bettable slate rather than the league's full fixture list. Bookmakers publish at different lead times: MLB games commonly the day before, NBA and NHL games one to two days out (the night before for back-to-backs), NFL and college football games early in the game week, and marquee events months ahead.
3. Pull the Market Board for an Event
Sport Event Markets returns every market for the event, each with every book pricing it. This response carries 27 markets; it is trimmed here to the winner market:
GET https://api.sportradar.com/oddscomparison-prematch/trial/v2/en/sport_events/sr:sport_event:63301085/sport_event_markets.json
x-api-key: YOUR_API_KEY{
"generated_at": "2026-07-20T16:32:58+00:00",
"sport_event": {
"id": "sr:sport_event:63301085",
"start_time": "2026-07-21T00:05:00+00:00",
"start_time_confirmed": true,
"status": "not_started",
"competitors": [
{
"id": "sr:competitor:3627",
"name": "Chicago Cubs",
"country": "USA",
"country_code": "USA",
"abbreviation": "CHC",
"qualifier": "home",
"rotation_number": 922
},
{
"id": "sr:competitor:3648",
"name": "Detroit Tigers",
"country": "USA",
"country_code": "USA",
"abbreviation": "DET",
"qualifier": "away",
"rotation_number": 921
}
]
},
"markets": [
{
"id": "sr:market:251",
"name": "winner (incl. extra innings)",
"is_live": false,
"books": [
{
"id": "sr:book:17324",
"name": "MGM",
"removed": false,
"external_sport_event_id": "19803922",
"external_market_id": "1542773883",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.870",
"odds_american": "-115",
"odds_fraction": "87/100",
"open_odds_decimal": "1.870",
"open_odds_american": "-115",
"open_odds_fraction": "87/100",
"external_outcome_id": "2253398329",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.950",
"odds_american": "-105",
"odds_fraction": "20/21",
"open_odds_decimal": "1.950",
"open_odds_american": "-105",
"open_odds_fraction": "20/21",
"external_outcome_id": "2253398328",
"removed": false
}
]
},
{
"id": "sr:book:18149",
"name": "DraftKings",
"removed": false,
"external_sport_event_id": "34413809",
"external_market_id": "1_85555146",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.877",
"odds_american": "-114",
"odds_fraction": "877/1000",
"open_odds_decimal": "1.870",
"open_odds_american": "-115",
"open_odds_fraction": "87/100",
"external_outcome_id": "0ML85555146_1",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.952",
"odds_american": "-105",
"odds_fraction": "119/125",
"open_odds_decimal": "1.952",
"open_odds_american": "-105",
"open_odds_fraction": "119/125",
"external_outcome_id": "0ML85555146_3",
"removed": false
}
]
},
{
"id": "sr:book:18186",
"name": "FanDuel",
"removed": false,
"external_sport_event_id": "35841674",
"external_market_id": "42.593016238",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.893",
"odds_american": "-112",
"odds_fraction": "893/1000",
"open_odds_decimal": "1.926",
"open_odds_american": "-108",
"open_odds_fraction": "463/500",
"external_outcome_id": "29166",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.962",
"odds_american": "-104",
"odds_fraction": "481/500",
"open_odds_decimal": "1.926",
"open_odds_american": "-108",
"open_odds_fraction": "463/500",
"external_outcome_id": "29159",
"removed": false
}
]
},
{
"id": "sr:book:25080",
"name": "consensus",
"removed": false,
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.877",
"odds_american": "-114",
"odds_fraction": "877/1000",
"open_odds_decimal": "1.926",
"open_odds_american": "-108",
"open_odds_fraction": "463/500",
"external_outcome_id": "29166",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.954",
"odds_american": "-105",
"odds_fraction": "477/500",
"open_odds_decimal": "1.926",
"open_odds_american": "-108",
"open_odds_fraction": "463/500",
"external_outcome_id": "29159",
"removed": false
}
]
},
{
"id": "sr:book:27447",
"name": "BetRivers",
"removed": false,
"external_sport_event_id": "1024788135",
"external_market_id": "2670685555",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.910",
"odds_american": "-110",
"odds_fraction": "10/11",
"open_odds_decimal": "1.910",
"open_odds_american": "-110",
"open_odds_fraction": "10/11",
"external_outcome_id": "4265584995",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.940",
"odds_american": "-106",
"odds_fraction": "47/50",
"open_odds_decimal": "1.930",
"open_odds_american": "-108",
"open_odds_fraction": "93/100",
"external_outcome_id": "4265584996",
"removed": false
}
]
},
{
"id": "sr:book:28901",
"name": "Bet365.US.NJ",
"removed": false,
"external_sport_event_id": "198179484",
"external_market_id": "198179484-1096",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.820",
"odds_american": "-122",
"odds_fraction": "41/50",
"open_odds_decimal": "1.820",
"open_odds_american": "-122",
"open_odds_fraction": "41/50",
"external_outcome_id": "1730171000",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.910",
"odds_american": "-110",
"odds_fraction": "10/11",
"open_odds_decimal": "1.910",
"open_odds_american": "-110",
"open_odds_fraction": "10/11",
"external_outcome_id": "1730170998",
"removed": false
}
]
},
{
"id": "sr:book:32219",
"name": "WilliamHillNewJersey",
"removed": false,
"external_sport_event_id": "627a61ed-4b9f-4ed2-a328-896b0e3d903a",
"external_market_id": "519355b5-9e6a-3fd3-8a71-1d2c6fe668f5",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.870",
"odds_american": "-115",
"odds_fraction": "87/100",
"open_odds_decimal": "1.870",
"open_odds_american": "-115",
"open_odds_fraction": "87/100",
"external_outcome_id": "d0f324ca-5f78-3966-b3cf-a6fe468e8205",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.952",
"odds_american": "-105",
"odds_fraction": "119/125",
"open_odds_decimal": "1.952",
"open_odds_american": "-105",
"open_odds_fraction": "119/125",
"external_outcome_id": "9821c272-d8a8-39e8-a679-9ae1189231c5",
"removed": false
}
]
},
{
"id": "sr:book:40316",
"name": "TheScore",
"removed": false,
"external_sport_event_id": "d0e0432a-9219-4884-b90e-720c34df0dab",
"external_market_id": "c61a8bf6-2087-4b7a-b514-9318e9c07093",
"outcomes": [
{
"id": "sr:outcome:4",
"type": "home",
"odds_decimal": "1.870",
"odds_american": "-115",
"odds_fraction": "87/100",
"open_odds_decimal": "1.910",
"open_odds_american": "-110",
"open_odds_fraction": "10/11",
"external_outcome_id": "164ee45b-dabb-4bb4-8bb7-44153b4caa2b",
"removed": false
},
{
"id": "sr:outcome:5",
"type": "away",
"odds_decimal": "1.950",
"odds_american": "-105",
"odds_fraction": "20/21",
"open_odds_decimal": "1.910",
"open_odds_american": "-110",
"open_odds_fraction": "10/11",
"external_outcome_id": "49135a11-9789-4e99-ad2a-97f9795b714c",
"removed": false
}
]
}
]
}
]
}<?xml version="1.0" ?>
<sport_event_markets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.sportradar.com/sportsapi/oddscomparison-prematch/v2" generated_at="2026-07-20T16:33:01+00:00" xsi:schemaLocation="http://schemas.sportradar.com/sportsapi/oddscomparison-prematch/v2 https://schemas.sportradar.com/sportsapi/oddscomparison-prematch/v2/schemas/sport_event_markets.xsd">
<sport_event id="sr:sport_event:63301085" start_time="2026-07-21T00:05:00+00:00" start_time_confirmed="true" status="not_started">
<competitors>
<competitor id="sr:competitor:3627" name="Chicago Cubs" country="USA" country_code="USA" abbreviation="CHC" qualifier="home" rotation_number="922"/>
<competitor id="sr:competitor:3648" name="Detroit Tigers" country="USA" country_code="USA" abbreviation="DET" qualifier="away" rotation_number="921"/>
</competitors>
</sport_event>
<markets>
<market id="sr:market:251" name="winner (incl. extra innings)" is_live="false">
<books>
<book id="sr:book:17324" name="MGM" removed="false" external_sport_event_id="19803922" external_market_id="1542773883">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.870" odds_american="-115" odds_fraction="87/100" open_odds_decimal="1.870" open_odds_american="-115" open_odds_fraction="87/100" external_outcome_id="2253398329" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.950" odds_american="-105" odds_fraction="20/21" open_odds_decimal="1.950" open_odds_american="-105" open_odds_fraction="20/21" external_outcome_id="2253398328" removed="false"/>
</outcomes>
</book>
<book id="sr:book:18149" name="DraftKings" removed="false" external_sport_event_id="34413809" external_market_id="1_85555146">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.877" odds_american="-114" odds_fraction="877/1000" open_odds_decimal="1.870" open_odds_american="-115" open_odds_fraction="87/100" external_outcome_id="0ML85555146_1" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.952" odds_american="-105" odds_fraction="119/125" open_odds_decimal="1.952" open_odds_american="-105" open_odds_fraction="119/125" external_outcome_id="0ML85555146_3" removed="false"/>
</outcomes>
</book>
<book id="sr:book:18186" name="FanDuel" removed="false" external_sport_event_id="35841674" external_market_id="42.593016238">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.893" odds_american="-112" odds_fraction="893/1000" open_odds_decimal="1.926" open_odds_american="-108" open_odds_fraction="463/500" external_outcome_id="29166" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.962" odds_american="-104" odds_fraction="481/500" open_odds_decimal="1.926" open_odds_american="-108" open_odds_fraction="463/500" external_outcome_id="29159" removed="false"/>
</outcomes>
</book>
<book id="sr:book:25080" name="consensus" removed="false">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.877" odds_american="-114" odds_fraction="877/1000" open_odds_decimal="1.926" open_odds_american="-108" open_odds_fraction="463/500" external_outcome_id="29166" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.954" odds_american="-105" odds_fraction="477/500" open_odds_decimal="1.926" open_odds_american="-108" open_odds_fraction="463/500" external_outcome_id="29159" removed="false"/>
</outcomes>
</book>
<book id="sr:book:27447" name="BetRivers" removed="false" external_sport_event_id="1024788135" external_market_id="2670685555">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.910" odds_american="-110" odds_fraction="10/11" open_odds_decimal="1.910" open_odds_american="-110" open_odds_fraction="10/11" external_outcome_id="4265584995" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.940" odds_american="-106" odds_fraction="47/50" open_odds_decimal="1.930" open_odds_american="-108" open_odds_fraction="93/100" external_outcome_id="4265584996" removed="false"/>
</outcomes>
</book>
<book id="sr:book:28901" name="Bet365.US.NJ" removed="false" external_sport_event_id="198179484" external_market_id="198179484-1096">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.820" odds_american="-122" odds_fraction="41/50" open_odds_decimal="1.820" open_odds_american="-122" open_odds_fraction="41/50" external_outcome_id="1730171000" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.910" odds_american="-110" odds_fraction="10/11" open_odds_decimal="1.910" open_odds_american="-110" open_odds_fraction="10/11" external_outcome_id="1730170998" removed="false"/>
</outcomes>
</book>
<book id="sr:book:32219" name="WilliamHillNewJersey" removed="false" external_sport_event_id="627a61ed-4b9f-4ed2-a328-896b0e3d903a" external_market_id="519355b5-9e6a-3fd3-8a71-1d2c6fe668f5">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.870" odds_american="-115" odds_fraction="87/100" open_odds_decimal="1.870" open_odds_american="-115" open_odds_fraction="87/100" external_outcome_id="d0f324ca-5f78-3966-b3cf-a6fe468e8205" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.952" odds_american="-105" odds_fraction="119/125" open_odds_decimal="1.952" open_odds_american="-105" open_odds_fraction="119/125" external_outcome_id="9821c272-d8a8-39e8-a679-9ae1189231c5" removed="false"/>
</outcomes>
</book>
<book id="sr:book:40316" name="TheScore" removed="false" external_sport_event_id="d0e0432a-9219-4884-b90e-720c34df0dab" external_market_id="c61a8bf6-2087-4b7a-b514-9318e9c07093">
<outcomes>
<outcome id="sr:outcome:4" type="home" odds_decimal="1.870" odds_american="-115" odds_fraction="87/100" open_odds_decimal="1.910" open_odds_american="-110" open_odds_fraction="10/11" external_outcome_id="164ee45b-dabb-4bb4-8bb7-44153b4caa2b" removed="false"/>
<outcome id="sr:outcome:5" type="away" odds_decimal="1.950" odds_american="-105" odds_fraction="20/21" open_odds_decimal="1.910" open_odds_american="-110" open_odds_fraction="10/11" external_outcome_id="49135a11-9789-4e99-ad2a-97f9795b714c" removed="false"/>
</outcomes>
</book>
</books>
</market>
<!-- ... 26 more markets omitted for brevity ... -->
</markets>
</sport_event_markets>Reading the board:
- Compare a selection across books by matching
outcome.id(heresr:outcome:4home,sr:outcome:5away) within a market - The consensus book gives you a single representative price per market
open_odds_*fields preserve the opening price beside the current one; handicap and total markets carry the line inhandicapandtotal(see Fundamentals)- The same market ID can appear once per instance (
sr:market:1123appears nine times as the per-inning winner markets), so key market rows onidplusname
4. Keep the Board Fresh with the Change Log
Instead of re-pulling every event on a timer, poll the Sport Event Markets Change Log. It lists the sport events whose odds changed within a five-minute window, with the change moment as a Unix timestamp in sport_event_markets_odds_change:
GET https://api.sportradar.com/oddscomparison-prematch/trial/v2/en/sport_event_markets_changelog.json
x-api-key: YOUR_API_KEY{
"generated_at": "2026-07-20T16:30:19+00:00",
"status": {
"from": 1784564719,
"to": 1784565019
},
"changes": [
{
"type": "sport_event",
"id": "sr:sport_event:72176810",
"sport_event_markets_odds_change": 1784565017
},
{
"type": "sport_event",
"id": "sr:sport_event:66886856",
"sport_event_markets_odds_change": 1784565017
},
{
"type": "sport_event",
"id": "sr:sport_event:68096138",
"sport_event_markets_odds_change": 1784565016
},
{
"type": "sport_event",
"id": "sr:sport_event:72905560",
"sport_event_markets_odds_change": 1784565016
}
]
}Re-pull Sport Event Markets only for the IDs returned. Poll the change log at least once per five minutes; a missed window cannot be queried retroactively, so on any gap re-pull your tracked events directly. See Monitoring Odds Changes for the full refresh strategy and observed cache behavior.
5. Handle Suspensions and the Closing Line
When a bookmaker takes a market down (including when the game goes live), its book entry remains with removed: true and the last prices intact; that retained price is effectively the closing line. Filter removed entries out of a live display, but keep them if you record closing lines; in-play prices for the same event are served by the Live Odds package (see Tracking Live Odds); the Prematch FAQ documents the same reading. The Fundamentals page shows a removed example and the odds-1.00 special case.
Common Use Cases
- Odds comparison board: steps 2 to 4 on a cadence, rendering per-book columns from each market's
booksarray - Line movement tracking: store
odds_*per poll and diff againstopen_odds_* - Closing line capture: after an event starts, pull its markets once more and persist the
removedbooks' retained prices
Updated 15 days ago
