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.

Updated June 2026Built on the live SportsGameOdds feed
How it works
  1. 1
    Store 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.

  2. 2
    Refetch 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.

  3. 3
    Grade 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.odds exposes a score result 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/ended flags tell you when to grade. Every odd carries started and ended, mirrored at status.started/status.ended, plus status.finalized on 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 score to closeOverUnder (greater is Over, equal is Push, less is Under), and settle spreads and moneylines the same way against bookSpread and 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 stored oddID, and read its score. 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=true each book returns its closeOdds/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 oddID makes settlement deterministic. The oddID format statID-statEntityID-periodID-betTypeID-sideID identifies 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 needSportsGameOddsOdds API + separate results API + grading logic
Result datascore on every odd, at every tierSecond results API to license and integrate
When to gradestarted/ended + status.finalized built inPoll a separate feed to detect game completion
Odds + result joinSame odd object: store oddID, refetch, gradeMatch odds to results by team name and timestamp
Grading logicCompare score to closeOverUnder / bookSpreadSame math, but only after you've joined two feeds
Closing line valuecloseOdds via includeOpenCloseOdds=trueSnapshot and store every line yourself at close
Market identityOne normalized oddID across books and leaguesReconcile each source's market and ID formats
MaintenanceOne feed; we absorb source-side changesRe-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

What is a bet settlement API?
A bet settlement API grades a placed bet after the game ends, marking each ticket as a win, loss, or push from the final result. SportsGameOdds does this from one feed: every odd object carries a score result plus started/ended flags and status.finalized, so the same /events call that priced the bet settles it across 85+ books, with no second results API to integrate.
How do I auto-grade a bet?
Store the eventID and oddID when a user logs a bet, then refetch the event with finalized=true and read that oddID's score. For a total, compare score to closeOverUnder: greater settles the Over, equal is a Push, less settles the Under. Spreads grade against bookSpread and moneylines against the side result the same way, so auto-grading is one comparison per ticket.
Which bet types can be settled?
Totals, spreads, and moneylines all settle from the score result on each odd object. A total compares score to closeOverUnder, a spread compares to bookSpread, and a moneyline checks the winning side. Because every market shares a normalized oddID, the ticket you stored at bet time maps back to one unambiguous odd object when you grade it.
Do I need a separate results API?
No. The result ships on the odds. Each odd object carries a score field plus started and ended flags, so a bet tracker API grades against the exact market it stored without licensing or joining a second results feed. That join, matching an odds vendor to a results vendor by team name, is the part most settlement stacks have to build and maintain themselves.
Can I track closing line value (CLV)?
Yes. Request includeOpenCloseOdds=true and each book returns its closeOdds, closeOverUnder, and closeSpread. Snapshot the price a user took at bet time, then compare it to the closing number to compute closing line value per ticket, a leading indicator of edge that pairs with the score field for realized results. Historical depth for CLV backtests is available on Pro plans and above.
How do I know when a bet can be graded?
Each odd carries started and ended flags, mirrored at status.started and status.ended, plus status.finalized on the event. Only grade once the market is ended and the event is finalized, so your settlement logic never fires on a half-finished game. Refetching with finalized=true returns exactly the events whose results are locked and ready to settle.

Related use cases

Auto-grade and settle bets

Free plan available. Set up in 5 minutes. No credit card required.