Historical Basketball Odds and Closing Lines API

Every price change for a game and the closing odds of finished games, for backtesting and model evaluation.

By the HoopsAPI team · Updated

HoopsAPI's historical odds API returns the closing odds of every finished basketball game on every plan, including the free one, and on the Data plan every price change for a game by bookmaker, market, line and period. Prices are recorded every 10 minutes from 6 bookmakers. Both are what you need to backtest a betting model or measure closing line value.

How do I get the closing odds of finished games?

After tip-off, a game moves to the archive. GET /v1/games/{game_id} keeps working and returns status: "archived" with each bookmaker's last prices before the start: main lines under periods and every alternate line under lines. This endpoint is available on every plan.

GET /v1/games/{game_id} for a finished game
{
  "game_id": 1637808609,
  "competition": "FIBA - Europe Cup",
  "home": "CS Dinamo Bucuresti",
  "away": "Szolnoki Olaj",
  "start_time": "2026-10-13T16:00:00Z",
  "status": "archived",
  "periods": { "ft": { "pinnacle": { "spread": { "line": -2.5, "home": 1.95, "away": 1.89 }, ... } } },
  "lines":   { "ft": { "pinnacle": { "spread": [ ... every closing line ... ] } } }
}

How do I get the full price history of a game?

GET /v1/games/{game_id}/history (Data plan) returns every price change for a game, newest first, for upcoming and finished games alike. Filter by bookmaker, market and period:

GET /v1/games/{game_id}/history?provider=pinnacle&market=moneyline&period=ft
{
  "game_id": 1637808609,
  "home": "CS Dinamo Bucuresti",
  "away": "Szolnoki Olaj",
  "competition": "FIBA - Europe Cup",
  "count": 38,
  "changes": [
    { "provider": "pinnacle", "market": "moneyline", "period": "ft", "line": null,
      "outcome": "home", "price": 1.62, "at": "2026-10-13T15:50:12Z" },
    { "provider": "pinnacle", "market": "moneyline", "period": "ft", "line": null,
      "outcome": "away", "price": 2.33, "at": "2026-10-13T15:50:12Z" },
    ...
  ]
}
ParameterValues
providerA bookmaker, e.g. pinnacle; see /v1/providers
marketmoneyline, spread, total, team_total_home, team_total_away
periodft, h1, h2, q1–q4
limit1–5000 changes, default 500

Prices are checked every 10 minutes and a change is recorded only when a price moves, so each entry's at is when the new price was first seen.

What can I use historical odds for?

  • Backtest a model against the prices that were actually available at the time of each bet, not only the closing ones.
  • Measure closing line value for every bet. See the CLV guide for code.
  • Study line movement: which bookmaker moves first, how far lines move before tip-off, and how quickly other bookmakers follow.

Price history is part of the Data plan. Closing odds of finished games come with every plan, including the free one. To get a whole league at once, the Data plan also includes monthly bulk downloads.

Try it with real data

The free plan includes 10 requests a day across every league and market. No credit card.