Odds API for Bet Tracking & Settlement
A bet tracking and settlement API: auto-grade bets from the score field and started/ended flags. Odds and results arrive in one feed, so there's no second results API to stitch in.
- 1Store the ticket at bet time
When a user logs a bet, persist the eventID and oddID, and optionally snapshot the price and line (bookOdds, bookOverUnder, bookSpread) to show their original number and compute CLV later.
- 2Refetch finalized events
After the games run, query /events with finalized=true and page with cursor and nextCursor; each event carries status.finalized and an odds map where every market now has a score result and ended set to true.
- 3Grade the bet from score
Compare the score result to the line your ticket stored. For a total, score above closeOverUnder is an Over, equal is a Push, below is an Under, and spreads and moneylines grade the same way.
A bet settlement API is the subsystem that grades a placed bet once the game is over. It reads the final result for each market and marks every ticket as a win, loss, or push. SportsGameOdds folds that into the odds feed itself: every odd object carries a score result plus started/ended flags and an event-level status.finalized, so the same /events call that priced the bet also settles it. You store an eventID and oddID at bet time, re-fetch the finalized event, and grade across 85+ books and 67+ leagues. There's no second results API to stitch in.
Why build your bet settlement on SportsGameOdds
- Result and odds share one object. Each market under
event.oddsexposes ascoreresult alongside its line fields (closeOverUnder,bookSpread,bookOdds), so a bet tracker grades against the exact market it stored. There's no fuzzy team-name matching between an odds vendor and a results vendor. started/endedflags tell you when to grade. Every odd carriesstartedandended, mirrored atstatus.started/status.ended, plusstatus.finalizedon the event. Your auto settle bets API only attempts to settle once the result is locked, never on a half-finished game.- Grading is a comparison, not an integration. Settle a total by comparing
scoretocloseOverUnder(greater is Over, equal is Push, less is Under), and settle spreads and moneylines the same way againstbookSpreadand the side result. The handling-odds guide ships this exact pattern. - One feed covers every ticket. Re-fetch finalized events with
finalized=true, walk each open ticket's storedoddID, and read itsscore. One call settles a whole slate across 85+ books, so a bet tracker API never reconciles a separate settlement source. - Closing lines enable CLV tracking. With
includeOpenCloseOdds=trueeach book returns itscloseOdds/closeOverUnder/closeSpread, so a bet tracker can record closing line value per ticket, comparing the price taken to the sharpest number the market settled on. - Normalized
oddIDmakes settlement deterministic. TheoddIDformatstatID-statEntityID-periodID-betTypeID-sideIDidentifies the same market on every refetch, so the ticket you stored at bet time maps back to one unambiguous odd object when you grade it.
How a bet tracker grades with our data
Grading a bet is a one-line comparison once the inputs are in hand. The real work is having the result attached to the exact market a user bet, in a shape you can replay. Here is how the schema maps to each stage of a sports results settlement API.
Store the ticket at bet time
When a user logs a bet, persist two identifiers: the eventID and the oddID of the market they took. Optionally snapshot the price and line they got (bookOdds, bookOverUnder, bookSpread) so you can show their original number later and compute closing line value once the game settles. That is the entire write path: two strings pin a ticket to a market you can refetch deterministically.
Refetch finalized events
After the games run, query /events with finalized=true (optionally scoped by leagueID and startsAfter/startsBefore) and page through with cursor/nextCursor. Each returned event carries status.finalized and an odds map where every market now has a score result and ended: true. Look up each open ticket's stored oddID directly under event.odds to get the odd object you need to grade.
Grade the bet from score
Compare the score result to the line your ticket stored. For a total, score greater than closeOverUnder settles the Over, equal settles a Push, and less settles the Under. Spreads grade against bookSpread and moneylines against the side result the same way. Because score lives on the odd object rather than on the event, a single market lookup gives you both the line and the outcome, so every ticket settles from one feed.
Example request
Fetch finalized NBA events so every market arrives with its result attached:
curl "https://api.sportsgameodds.com/v2/events?leagueID=NBA&finalized=true&includeOpenCloseOdds=true" \
-H "x-api-key: YOUR_API_KEY"
A trimmed market shows the result, the timing flags, and the closing line you grade against, all on one odd object:
{
"eventID": "LAL_at_BOS_2026...",
"status": { "started": true, "ended": true, "finalized": true },
"odds": {
"points-all-game-ou-over": {
"oddID": "points-all-game-ou-over",
"betTypeID": "ou",
"started": true,
"ended": true,
"score": 229,
"closeOverUnder": "224.5",
"byBookmaker": {
"draftkings": { "odds": "-110", "overUnder": "224.5", "closeOverUnder": "224.5", "available": true }
}
}
}
}
Here the total closed at 224.5 and score came back 229, so the grading logic is one comparison: score (229) is greater than closeOverUnder (224.5), so the Over settles as a win. Equal would be a Push, and less would be the Under. See the docs and the handling odds guide for the full grading pattern in JavaScript.
SportsGameOdds vs building settlement yourself
| What you need | SportsGameOdds | Odds API + separate results API + grading logic |
|---|---|---|
| Result data | score on every odd, at every tier | Second results API to license and integrate |
| When to grade | started/ended + status.finalized built in | Poll a separate feed to detect game completion |
| Odds + result join | Same odd object: store oddID, refetch, grade | Match odds to results by team name and timestamp |
| Grading logic | Compare score to closeOverUnder / bookSpread | Same math, but only after you've joined two feeds |
| Closing line value | closeOdds via includeOpenCloseOdds=true | Snapshot and store every line yourself at close |
| Market identity | One normalized oddID across books and leagues | Reconcile each source's market and ID formats |
| Maintenance | One feed; we absorb source-side changes | Re-fix grading every time a results feed changes |
You can build settlement yourself and keep full control over grading rules. The real cost isn't the win/push/loss math, though. It's standing up a second results feed and reliably joining it to the odds you priced. SportsGameOdds collapses that into one refetch against the same schema.
Frequently asked questions
Related use cases
- Sports Odds API for Betting Apps: power a full betting app with odds, scores, and settlement in one feed.
- Historical Odds Data API: opening and closing lines for CLV and backtesting.
- Sports Betting Machine Learning Data API: use the same
scoresettlement as training labels. - Handling odds guide: the grading pattern that settles totals, spreads, and moneylines.
- Pricing: per-event-object plans, including Pro+ historical access.
Auto-grade and settle bets
Free plan available. Set up in 5 minutes. No credit card required.