Dataset

MLB historical closing lines, by book

Short answer: the MLB Odds package ($299, one time) is MLB moneyline, run line and total by book, with lines from 2015 and opening and closing lines per book from July 2020, plus a consensus close per game and the games file to key it on. Pregame only, as CSV and Parquet.

What you are buying

The MLB Odds package (id mlb-odds, $299 one time) has three tables that join on game_id:

  • games: one row per game with the season, date, teams, final score, venue and city.
  • game_odds: one row per game, book and capture, with the moneyline, run line, total and the price on each side.
  • consensus_close holds one row per game with the consensus closing run line and total, and the number of books behind them.

Odds are the only MLB tier on sale today. The history tiers, with pitch-by-pitch and plate appearances, are due before Opening Day 2027. Until then the pitch-level data is available through the API, and the MLB pitch-by-pitch page covers it.

This is market history, not advice. It records what each book posted for each game and when.

The Pro leagues Odds bundle ($999) covers the NFL, NBA, NHL and MLB odds packages together, and the All six leagues bundle ($1,199) adds college football and college basketball. If you buy MLB Odds first, the catalog allows an upgrade to a bigger tier for the price difference within 90 days once those tiers exist.

Coverage and updates

The site lists MLB lines by book from 2015, and opening and closing lines per book from July 2020. The catalog does not state a row total for this tier, so we do not quote one. Your manifest.json has the exact count for each season file.

We checked coverage live by asking the API for one regular-season game from the end of four different seasons:

SeasonGame dateBooks with linesOpening prices
2015Oct 1, 20154none
2019Sep 26, 20197none
2021Sep 30, 2021167 of 16 books
2025Sep 25, 202511 of 1

Two things show up. Opening prices begin later than closing prices, which matches the site, and even in 2021 only 7 of the 16 books had one. And the number of books per game is not stable: the 2025 game we happened to pick had a single book. We come back to that below.

Every package includes finished seasons plus the current season as of our latest monthly update on the day you buy. With an API plan of Pro or higher we refresh the current season's files every month at no charge. Without a plan, an end-of-season update costs a quarter of the package price. You can re-download for 365 days.

Schema

These are the real column names from the MLB Odds free sample, with the matching field in the API's get_odds tool. The API puts open and close side by side in one row per book, while the package stores one row per capture.

Package columnAPI fieldMeaning
game_idgame_idGame key, for example 401908045
bookmakerproviderThe book, as a code in this page
snapshot_typenot returnedopening, closing or snapshot
captured_atcaptured_atWhen the line was captured, UTC
minutes_before_startnot returnedMinutes before the scheduled start
ml_home, ml_awayhome_ml_open and home_ml_close, away_ml_open and away_ml_closeMoneyline, American odds
spread_homehome_run_line_open, home_run_line_closeRun line for the home side
spread_home_odds, spread_away_oddsrun_line_home_odds, run_line_away_oddsPrice on each side of the run line
totaltotal_open, total_closeGame total in runs
total_over_odds, total_under_oddsover_odds, under_oddsPrice on each side of the total

The API also returns home_close_prob and away_close_prob, implied probabilities with the book's margin inside them, and a result block for the game: the median home moneyline, the median total, whether the favourite won and whether the total went over.

A real sample

Five closing rows for game 401908045 (Milwaukee at Tampa Bay, October 27, 2026, a 12-inning game that finished 3 to 4), from the free sample. Book names are replaced with codes. All five were captured 4 minutes before the start.

game_idbookmakerminutes_before_startml_homeml_awayspread_homespread_home_oddsspread_away_oddstotaltotal_over_oddstotal_under_odds
401908045book_14100-1201.5-1701407-120100
401908045book_24104-1151.5-1671477.5100-120
401908045book_34102-1221.5-1701457.5100-120
401908045book_44103-1161.5-1711417.5102-122
401908045book_54111-1251.5-1751457.5105-125

The run line is 1.5 at every book and only the price tells the books apart. The total is 7 at one book and 7.5 at the others.

Load the files

DuckDB reads the sample CSV. This lists, per game, how many closing rows exist, how far apart the closing totals were, and how many opening rows have no capture time. We ran it on the free sample, and the output is in the Verification table. In the paid package the big tables are one file per season, so replace the file names with your own pattern.

import duckdb

duckdb.sql("""
    SELECT g.game_id, g.game_date,
           count(*) FILTER (WHERE o.snapshot_type = 'closing')                       AS closing_rows,
           max(o.total) FILTER (WHERE o.snapshot_type = 'closing')
             - min(o.total) FILTER (WHERE o.snapshot_type = 'closing')               AS closing_total_range,
           count(*) FILTER (WHERE o.snapshot_type = 'opening' AND o.captured_at IS NULL) AS opening_rows_no_time
    FROM read_csv('games.csv') g
    LEFT JOIN read_csv('game_odds.csv') o USING (game_id)
    GROUP BY g.game_id, g.game_date
    ORDER BY g.game_id
""").show()

The same in Polars, also run on the sample.

import polars as pl

games = pl.scan_csv("games.csv").select("game_id", "game_date")
odds = pl.scan_csv("game_odds.csv")
out = (
    games.join(odds, on="game_id", how="left")
    .group_by("game_id", "game_date")
    .agg(
        (pl.col("snapshot_type") == "closing").sum().alias("closing_rows"),
        (pl.col("total").filter(pl.col("snapshot_type") == "closing").max()
         - pl.col("total").filter(pl.col("snapshot_type") == "closing").min()).alias("closing_total_range"),
        ((pl.col("snapshot_type") == "opening") & pl.col("captured_at").is_null()).sum().alias("opening_rows_no_time"),
    )
    .sort("game_id")
    .collect()
)
print(out)

A left join from games is deliberate. It keeps a game with no closing rows in the output, which an inner join would hide.

Same data through the API

For one game, call the API. Set FASTBALLAPI_API_KEY first. This is the same game as the sample above.

import json
import os
import urllib.request

req = urllib.request.Request(
    "https://mcp.fastballapi.com/v1/get_odds",
    data=json.dumps({"game_id": "401908045"}).encode(),
    headers={"Content-Type": "application/json", "x-api-key": os.environ["FASTBALLAPI_API_KEY"]},
)
with urllib.request.urlopen(req, timeout=30) as resp:
    print("HTTP", resp.status)
    game = json.load(resp)["data"]["games"][0]
    books = game["books"]
    print(len(books), "books, run line", {b["home_run_line_close"] for b in books},
          "closing totals", sorted({b["total_close"] for b in books}), "result", game["result"])

get_odds costs 5 credits for one game and 10 for a whole day. The free plan gives 500 credits a month, no card.

Worked example: how the total drifted in one game

In game 401908045 the API shows each book's opening and closing total. At open the eight books posted 7, 7, 6.5, 7, 7.5, 7, 7 and 7.5. At close they posted 7, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 and 7.5. Five of the eight moved up by half a run or a full run, and three did not move. The game then ended with 7 runs in 12 innings, below the 7.5 median close.

That is one game, and it proves nothing beyond what the rows say. It does show the shape of the analysis you can run on the full file: for every book and game, subtract the opening total from the closing total, then group by season or by book. The opening rows in the paid files have no capture time in the sample, so you can say how far a line moved but not how fast.

What we saw in a 25-game spot check

We took every fourth game from the latest 100 regular-season games of 2025 (September 21 to 28) and called get_odds on each of the 25.

MeasureValue
Games with 8 books16
Games with 1 book9
Of the 16, closing totals differed across books12
Mean gap between highest and lowest closing total0.41 runs
Book rows whose total moved from open to close42 of 128
Mean of the median closing total8.34
Mean combined runs7.75

The nine single-book games all carried one book and no more. We do not know why from the response, so before you build on a recent season, count books per game and decide what minimum you accept.

What the columns mean in practice

  • Not every game has a closing row. In the sample, game 401908046 has 204 snapshot rows and 8 opening rows but no closing row, and the consensus file has no row for it. A join that assumes one closing row per game will drop it silently.
  • Opening rows have no timestamp. In the sample all 16 opening rows have a blank captured_at and minutes_before_start. Use them for the level of the opening line, not for timing.
  • Snapshots are thinner than closes. The 422 snapshot rows carry a moneyline and almost always a run line and a total, but no run line prices and no total prices. Only the closing rows have a full set of prices.
  • Run lines look the same everywhere. The run line is almost always 1.5 on one side and -1.5 on the other. The home line in the sample is +1.5 at all eight books, and the prices carry the real information, from -163 to -175.
  • Moneyline pairs cross zero. A home price of +100 and an away price of -120 sit on either side of the sign change, so a raw difference between two books can look huge when it is small. Convert to implied probability first.
  • The number of books varies by game. It was 8 in the sample and in 16 of our 25 spot-check games, and 1 in the other 9.

Reading the rows

Choose one capture rule and keep it: the closing row is the last capture before the scheduled start, and the opening row is the earliest line we hold. Count games, not rows. Check which games lack a closing row before you compute any average, and report how many you dropped. If you need a single number per game, the consensus table gives one, but only where it has a row.

Game ids in this file are numeric strings such as 401908045. Older games use a different id range, so keep the id as text and do not assume a pattern.

When not to use this

  • You need one game or one day. The API returns every book's lines for 5 or 10 credits.
  • You need live lines. Odds are pregame only, and files refresh monthly at best.
  • You need pitches, plate appearances or box scores. History tiers are not on sale yet, and the API has them.
  • You need first-five-innings or alternate lines. The API's get_market_odds and get_alt_lines hold those.
  • You need player props for MLB. There is no MLB props package today.
  • You want to resell the lines. The licence (version 2026-12-05) allows internal and commercial use, and publishing your own derived statistics, but not redistribution of raw files.
  • You want advice. These are historical prices.

Who uses closing lines

Most buyers use the closing moneyline and total as a market baseline for team ratings and game models. Others compare books, measure how lines moved from open to close, or check how a model's numbers differ from the market over a season. Some want a keyed file that joins to results without scraping. A season of MLB is 2,430 regular-season games before the playoffs, so each job reads a lot of rows at once.

Free sample first

Every tier has a free sample zip with a few real games and the same columns. Download it from the data packages page and test one game before you pay.

Buy MLB Odds for $299 or test the API free.

Live from the API

Free to embed on your own site, with no key needed. Get the embed code.

Get a free key Or download whole seasons as Parquet

Checked against the live API on 2026-12-06. Questions: hello@sportsdatahq.com.