Dataset
NHL historical closing lines, by book
Short answer: the NHL Odds package ($299, one time) is NHL moneyline, puck line and total by book, with closing lines from 2019-20 and opening lines from 2020-21, plus the games file to key them on. Every line is pregame, as CSV and Parquet.
What you are buying
The NHL Odds package (id nhl-odds, $299 one time) is the game-odds slice of our NHL data. The catalog lists three tables that join on game_id:
- games: one row per game with the date, teams, final score and game type.
- game_odds: one row per game, book and capture, with the moneyline, puck line, total and the price on each side.
- consensus_close holds one row per game with a consensus closing line.
One caution before the schema. The free sample we can download for the neighbouring tier, NHL History + Odds, holds its odds in a file called odds_open_close, with a sportsbook column and puck_line_* names, and it has no consensus file. The columns below come from that sample and from the live API. Your own manifest.json is the final word on file names for the Odds-only package.
This is market history, not advice. It shows what each book posted for each game and when it posted it.
Bigger tiers contain this data. NHL History + Odds ($499) adds every game, play, shift and goalie line. NHL Complete ($799) adds graded player props from 2022-23 and the full intraday line history by book and market from 2019-20. The Pro leagues Odds bundle ($999) covers the NFL, NBA, NHL and MLB odds packages together. If you buy Odds first, you can upgrade for the price difference within 90 days.
Coverage and updates
The site lists NHL lines by book since 2019-20, and opening and closing lines from 2020-21. We do not quote a row total because the catalog does not state one for this tier. Your manifest.json has the exact count for every season file.
Coverage is not flat across the years, and we checked it live. We asked the API for a mid-season regular-season game in each of three seasons:
| Season | Game date | Books with lines | Capture types |
|---|---|---|---|
| 2018-19 | Apr 1, 2019 | 0 | none |
| 2019-20 | Mar 5, 2020 | 2 | closing only |
| 2020-21 | May 6, 2021 | 11 | opening and closing |
The first season has no lines at all, the second has a thin set of closing prices, and from the third season on you get both ends of the day. Plan your sample period around that.
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 NHL History + Odds free sample, with the matching field in the API's get_odds tool, which returns camelCase names.
| Package column | API field | Meaning |
|---|---|---|
| game_id | game_id | Game key, for example 2025030416 |
| sportsbook | bookmaker | The book, as a code in this page |
| snapshot_type | snapshotType | opening, closing, or an intermediate capture |
| captured_at | capturedAt | When the line was captured, UTC |
| scheduled_start | not returned | Scheduled start of the game |
| ml_home, ml_away | mlHome, mlAway | Moneyline, American odds |
| puck_line_home, puck_line_away | spreadHome, spreadAway | Puck line for each side |
| puck_line_home_price, puck_line_away_price | spreadHomeOdds, spreadAwayOdds | Price on each side of the puck line |
| total | total | Game total in goals |
| over_price, under_price | totalOverOdds, totalUnderOdds | Price on each side of the total |
The API also returns mlHomeProb and mlAwayProb, the implied probabilities with the book's margin still inside them, and source, which read archive on every row we saw. Unknown values are blank, never 0, and a price outside the range a book could post is left empty.
A real sample
Five closing rows for game 2025030416 (Vegas at home against Carolina, June 14, 2026, final score 0 to 3), from the free sample. Book names are replaced with codes. All five were captured at 23:50:36 UTC for a 00:00 UTC start.
| game_id | sportsbook | snapshot_type | ml_home | ml_away | puck_line_home | puck_line_home_price | puck_line_away_price | total | over_price | under_price |
|---|---|---|---|---|---|---|---|---|---|---|
| 2025030416 | book_1 | closing | -105 | -115 | 1.5 | -250 | 200 | 6 | -115 | -105 |
| 2025030416 | book_2 | closing | 100 | -114 | 1.5 | -250 | 207 | 6 | -103 | -113 |
| 2025030416 | book_3 | closing | 100 | -120 | 1.5 | -250 | 210 | 6 | -103 | -117 |
| 2025030416 | book_4 | closing | -105 | -115 | 1.5 | -265 | 215 | 5.5 | -130 | 110 |
| 2025030416 | book_5 | closing | 108 | -117 | 1.5 | -245 | 210 | 5.5 | -130 | 115 |
Books agree on the puck line and disagree by half a goal on the total, and the moneyline for the home side ranges from -105 to +108. That is typical for a closing snapshot: the books sit close to each other, not on top of each other.
Load the files
DuckDB reads a folder of Parquet files. This keeps the closing rows and reports, per game, how many books posted a line, how far apart their totals were, and the average margin built into each book's two-way moneyline. We ran it on the Parquet files in the NHL History + Odds free sample and got the three games shown in the Verification table. The paid file names may differ, so check your manifest.
import duckdb
duckdb.sql("""
WITH c AS (
SELECT *,
CASE WHEN ml_home < 0 THEN -ml_home / (-ml_home + 100.0) ELSE 100.0 / (ml_home + 100.0) END AS p_home,
CASE WHEN ml_away < 0 THEN -ml_away / (-ml_away + 100.0) ELSE 100.0 / (ml_away + 100.0) END AS p_away
FROM read_parquet('odds_open_close_*.parquet')
WHERE snapshot_type = 'closing'
)
SELECT game_id,
count(*) AS books,
max(total) - min(total) AS total_range,
round(avg(p_home + p_away - 1), 3) AS avg_margin
FROM c
GROUP BY game_id
ORDER BY game_id
""").show()The same in Polars, also run on the sample.
import polars as pl
def implied(col):
return pl.when(pl.col(col) < 0).then(-pl.col(col) / (-pl.col(col) + 100.0)).otherwise(100.0 / (pl.col(col) + 100.0))
out = (
pl.scan_parquet("odds_open_close_*.parquet")
.filter(pl.col("snapshot_type") == "closing")
.with_columns((implied("ml_home") + implied("ml_away") - 1).alias("margin"))
.group_by("game_id")
.agg(
pl.len().alias("books"),
(pl.col("total").max() - pl.col("total").min()).alias("total_range"),
pl.col("margin").mean().round(3).alias("avg_margin"),
)
.sort("game_id")
.collect()
)
print(out)The margin column is the sum of the two implied probabilities minus one. A value of 0.04 means the pair of prices adds up to 104 percent, so the book keeps about four points of margin in that market.
Same data through the API
For one game, call the API. Set PUCKAPI_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.puckapi.com/v1/get_odds",
data=json.dumps({"game_id": "2025030416"}).encode(),
headers={"Content-Type": "application/json", "x-api-key": os.environ["PUCKAPI_API_KEY"]},
)
with urllib.request.urlopen(req, timeout=30) as resp:
print("HTTP", resp.status)
d = json.load(resp)["data"]
closing = [o for o in d["odds"] if o["snapshotType"] == "closing"]
totals = sorted({o["total"] for o in closing})
print(d["bookmaker_count"], "books,", len(d["odds"]), "rows,", len(closing), "closing, totals", totals)get_odds costs 10 credits per call. The free plan gives 500 credits a month, no card, so a few dozen games fit in the free tier.
What we saw in a 25-game spot check
To see what a typical regular-season game looks like, we took every fourth game from the latest 100 regular-season games of 2025-26 (April 4 to April 16, 2026), 25 games in all, and called get_odds on each.
| Measure | Value |
|---|---|
| Games with 8 books | 25 of 25 |
| Rows per game (opening plus closing) | 12 to 16, 395 in total |
| Games where closing totals differed across books | 14 of 25 |
| Mean gap between highest and lowest closing total | 0.30 goals |
| Book rows whose total moved from open to close | 18 of 95 that had both |
| Mean of each game's median closing total | 6.24 |
| Mean combined final score | 5.52 |
Rows per game fall below 16 when a book has no opening or no closing capture for a game. Only 95 book rows had both a total at the open and one at the close, which is why that denominator is smaller than the 200 you might expect from 25 games and 8 books.
A closing total is a market's central estimate and not a forecast anyone should expect to land exactly. The average here sat 0.7 goals above the average real score, and individual games missed by several goals either way.
Worked example: how tight is a closing market?
Take the three games in the sample. Across 8 books, the closing total range was 0.5, 0.5 and 0.0 goals, and the average margin inside the moneyline pairs was 3.7, 4.0 and 4.0 percent. That gives you a first-pass feel for how much disagreement and how much margin sits in a typical NHL closing snapshot, and it takes one query.
To extend it, run the same query over a full season file and group by season. You will get a distribution of margins per season and per book, which is a clean way to see whether books tightened or widened over time. Do the analysis on closing rows only, because opening and intermediate rows were captured at different times of day and are not comparable with each other.
What the columns mean in practice
- Opening is not the first posting. It is the first line we hold for that game and book. Since 2025-26 it is the game-day morning line, and in 2026-27 a separate
firstcapture, made up to a day or more ahead, comes before it. - captured_at changes meaning by era. For 2019-20 regular-season rows, and for closing lines at most books through 2023-24, the row is closing only and
captured_atis the scheduled start, because the moment the line was taken was not recorded. From the 2019-20 playoffs the time is that of the archived snapshot, and closing captures are typically 5 to 10 minutes before the start. From October 2026 it is the book's own last-update time. - Moneyline gaps cross zero. American odds jump from -100 to +100. In 2 of our 25 spot-check games a raw max minus min of the home moneyline read over 200 only because one book had -103 and another +103. Convert to implied probability first.
- Puck line prices are lopsided. In the sample game the home side's +1.5 carries a price near -250 and the away side's -1.5 a price near +200. Compare lines and prices together, never the line alone.
- A listed book is not a book with closing rows. The coverage file in the sample lists 46 books for the 2025-26 regular season, but only 8 of them have closing captures.
- Totals move in half-goal steps with price shifts. A total of 5.5 priced at -130 and a total of 6 priced near even money describe a similar view. Do not compare the numbers without the prices.
Reading the rows
A few habits keep the analysis clean. Pick one capture rule and keep it: the closing row is the last capture before the scheduled start, and the opening row is the first. Count games, not rows, because each game has many books and several captures. Drop rows with blank prices before you compute a margin, and report how many you dropped. Join to games on game_id before you look at results, so you are comparing the line with the right final score.
Season labels in this data follow the game id: 2025030416 is a 2025-26 playoff game, played in June 2026.
When not to use this
- You need one game or one night. The API returns every book's lines for a game for 10 credits.
- You need live lines. Odds are pregame only, and files refresh monthly at best.
- You need player props or the full minute-by-minute history. Those are in NHL Player Props ($299) and NHL Complete ($799).
- You need lines before 2019-20. We found none for 2018-19.
- You need shot locations or shifts. The NHL shot-level Parquet page covers those.
- 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 test whether a rating adds anything beyond the market. Some want a keyed file that joins to results without scraping. Each of those jobs reads thousands of games at once, which suits a file better than a call per game.
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.
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.