Historical odds API

Historical odds API with timestamped line history for every market and book: opening prices, every move and the closing line, for backtests, CLV and research.

Where a line opened and how it moved tells you more than where it sits now. PreciseAPI records every move for main markets on every book.

Where a line opened and how it moved tell you more than where it sits now: they are the inputs for closing line value, steam detection and any honest backtest. PreciseAPI's historical odds API is the /v1/history endpoint, which returns the opening price, the current price and every recorded move for one book's main full-game market. It covers markets on the board now and games that finished recently. It is not a multi-season archive, and this page is specific about the difference.

What the historical odds API returns

GET /v1/history returns one market at one book. Name it by market_id, taken from any odds response, or by event_id plus book, with market set to moneyline, spread or total (moneyline by default). format works as it does on every odds endpoint.

curl "https://api.preciseapi.com/v1/history?event_id=evt_1iazqk4srnb&book=pinnacle&market=total" \
  -H "Authorization: Bearer $PRECISEAPI_KEY"
{
  "data": {
    "market_id": "mkt_27xctmykw6y",
    "open": { "t": "2026-11-10T16:02:11.402Z", "line": 228.5, "prices": [-108, -112] },
    "current": { "t": "2026-11-11T22:41:37.918Z", "line": 228.5, "prices": [-115, -105] },
    "points": [
      { "t": "2026-11-10T16:02:11.402Z", "line": 228.5, "prices": [-108, -112] },
      { "t": "2026-11-11T14:20:05.077Z", "line": 228.5, "prices": [-110, -110] },
      { "t": "2026-11-11T22:41:37.918Z", "line": 228.5, "prices": [-115, -105] }
    ]
  },
  "meta": { "credits_used": 3 }
}

Each point has a timestamp t, the line (null for moneylines) and prices in the same order as the market's outcomes in odds responses. open is the first price the feed recorded for the market and current is the latest. The opening point is always kept; on the busiest markets the oldest moves in between can be trimmed, so if you need every tick, save points as you go.

What is recorded, and how far back it goes

History is kept for the main full-game moneyline, spread and total at every sportsbook and exchange in the feed. Player props, alternate lines, team totals, halves and quarters, futures and DFS lines have no history; asking for one returns 404 history_not_found or market_not_found.

Spreads and totals need one more detail. Each number a book posts is its own market, so when a book moves a total from 228.5 to 229.5, the 229.5 market starts its own history. Looked up by event_id and book, you get the book's current number. To follow a spread across several numbers, keep the market ids you see in /v1/odds responses, or in the stream's line_moved removals, and request each one by market_id on the same day.

A market's history starts when the feed first sees it and runs to its current price. Lookups by event_id find the market a book is posting now, so they work before and during a game; once books take a finished game's markets down, request the history by market_id. It stays readable for 48 hours after the market's last change, not indefinitely, so save it the same day. There is no odds archive of past seasons behind the endpoint, and nothing is backfilled for games that were never on the feed.

Opening odds API: the open field

If you need an opening odds API, open is the field: the first price recorded for that market at that book. For a moneyline it is the opener for the whole life of the game; for a spread or total it is the opener at that number.

Closing lines

The close is the last point whose t is before the event's start_time. Points after it are in-play moves, which are recorded too. While a game is in progress, reading its history needs Syndicate, the same rule as in-play odds; once it is final, any paid plan can read it.

Historical odds data download: building your own dataset

There is no historical odds data download, bulk export or file to buy. Teams that need historical sports odds data from PreciseAPI pull it over the API and store it. The dependable moment is just before a game starts: one call per book and market then returns the open, every pre-game move and the price going into the game, on any paid plan. Run this every ten minutes and it saves each game as it approaches:

import csv, os, requests
from datetime import datetime, timedelta, timezone

API = "https://api.preciseapi.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['PRECISEAPI_KEY']}"}
BOOKS = ["pinnacle", "circa", "draftkings", "fanduel"]

now = datetime.now(timezone.utc)
window = {"league": "nba", "status": "scheduled",
          "date_from": now.isoformat(), "date_to": (now + timedelta(minutes=10)).isoformat()}
games = requests.get(f"{API}/events", params=window, headers=HEADERS).json()["data"]

with open("nba_line_history.csv", "a", newline="") as f:
    out = csv.writer(f)
    for game in games:
        for book in BOOKS:
            for market in ["moneyline", "spread", "total"]:
                r = requests.get(f"{API}/history", headers=HEADERS,
                                 params={"event_id": game["id"], "book": book, "market": market})
                if r.status_code != 200:
                    continue  # the book isn't pricing it; errors aren't charged
                h = r.json()["data"]
                for p in h["points"]:
                    out.writerow([game["id"], game["start_time"], book, market, h["market_id"], p["t"], p["line"], *p["prices"]])

A ten-game NBA night across four books and three markets is up to 120 history calls, or 360 credits, and the schedule checks add 144 credits a day. Because each spread or total number is its own market, this captures the number each book has as the game starts. Keep market_id with every row: requesting it again later the same day adds the moves recorded after your call, including in-play ones.

Plans and credit cost

Each call to the historical odds API costs 3 credits and returns one market. Line history is included on Edge, Sharp and Syndicate. Edge's 100,000 monthly credits cover about 33,000 history calls; Sharp and Syndicate have unlimited credits, and Syndicate adds history for games in progress. The free Sandbox's key doesn't include /v1/history, which returns 403 plan_feature_unavailable until you move to Edge. See odds API pricing. In an AI client connected to the odds API MCP server, the get_line_history tool reads the same endpoint for questions like "how has this spread moved this week?"

How the odds history API compares with archives

If you need years of historical betting odds for a backtest today, an archive provider is a better fit than a historical odds API built around the live board. As checked in October 2026, The Odds API keeps snapshots back to June 2020, at 10-minute intervals and 5-minute from September 2022, with props history from May 2023, on paid plans. OddsBlaze lists historical odds, its Rewind replay and CLV data from $299 a month. SportsDataIO lists historical and closing lines with movement timestamps, and SharpAPI offers history on Enterprise only.

PreciseAPI's line history is different in kind: recorded moves rather than interval snapshots, for markets on the board now and games that just finished, on every paid plan. Teams that want long-run sports betting historical data from it build the dataset forward from the day they start. The The Odds API alternative page sets the two side by side.

What people build with line history

The line movement API page covers movement alerts and webhooks, and the betting odds API page covers the current prices these histories end at.

Frequently asked questions

How far back does the historical odds API go?

From when the feed first recorded a market to its current price, for games on the board now and markets that changed in the last 48 hours. It is not an archive of past seasons, so save what you need as games start and finish.

Can I download historical odds data in bulk?

No. There is no bulk download or export. Pull /v1/history over the API, one market per call at 3 credits, and store the results in your own database or files.

Does line history include player props, halves or alternate lines?

No. History is kept for the main full-game moneyline, spread and total only, at every sportsbook and exchange. For other markets, store /v1/odds or /v1/props snapshots yourself.

Which plans include line history?

Edge, Sharp and Syndicate. History for a game in progress needs Syndicate, because its latest points are in-play prices.

What is recorded

History is kept for the main full-game markets, moneyline, spread and total, on every book. Each record has the opening value, the current value and every change in between, each with a timestamp, the line and the prices. Ask for a market by the market_id from any odds response, or by event_id and book with market set to moneyline, spread or total.

Using it

Line charts plot the points directly. Closing line value compares the price you took with the last price before the event started. Steam detection looks for the same move at several books within a short window. Each /v1/history call costs 3 credits and returns one market, so store the records you need as games finish.

Example request

GET /v1/history?event_id=EVENT_ID&book=pinnacle&market=spread

Endpoint

What teams build with it

Related reading

More products

Responses use the same event, market and outcome ids as every other endpoint. Prices are American odds by default, with format=decimal and format=probability for the other two, and a market whose source has stopped reporting is flagged suspended instead of being shown as live.

Every source and league is on the coverage page, and what each request costs is on the pricing page.