Skip to content

Guides

How do I see how an NHL line moved from open to close?

Each sportsbook's snapshots of a game's moneyline, puck line and total in time order, so you can measure how far the price moved and which books moved first.

Code verified November 18, 2026. One call to get_line_movement, 25 credits.

The call

game_id comes from get_games or get_schedule. Pass bookmaker to keep one book. Snapshots are early opening, opening and closing, and some books have only two of them.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

resp = requests.post(
    "https://mcp.puckapi.com/v1/get_line_movement",
    headers={"x-api-key": API_KEY},
    json={
        "game_id": "2025020002",
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

def implied(odds):
    return 100 / (odds + 100) if odds > 0 else -odds / (-odds + 100)

rows = []
for book, snaps in data["movement"].items():
    snaps = sorted(snaps, key=lambda s: s["capturedAt"])
    first, last = snaps[0], snaps[-1]
    rows.append({
        "book": book,
        "snapshots": len(snaps),
        "first": first["snapshotType"],
        "ml_first": first["mlHome"],
        "ml_last": last["mlHome"],
        "prob_move": implied(last["mlHome"]) - implied(first["mlHome"]),
        "total_first": first["total"],
        "total_last": last["total"],
    })
moves = pd.DataFrame(rows)
print(data["away_team"], "at", data["home_team"])
print(moves.round(3).to_string(index=False))
print("average move in home win probability:", round(moves["prob_move"].mean(), 3))

Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.

Or use the official client: pip install puckapi

What comes back

The data object of the response, trimmed to the first rows. Every field is real output from the run above.

{
  "game_id": "2025020002",
  "home_team": "NYR",
  "away_team": "PIT",
  "movement": {
    "betmgm": [
      {
        "bookmaker": "betmgm",
        "snapshotType": "early_opening",
        "source": "archive",
        "mlHome": -225,
        "mlAway": 185,
        "spreadHome": -1.5,
        "total": null,
        "capturedAt": "2025-10-06T23:54:46.000Z"
      },
      {
        "bookmaker": "betmgm",
        "snapshotType": "opening",
        "source": "archive",
        "mlHome": -225,
        "mlAway": 185,
        "spreadHome": -1.5,
        "total": null,
        "capturedAt": "2025-10-07T11:53:38.000Z"
      },
      {
        "bookmaker": "betmgm",
        "snapshotType": "closing",
        "source": "archive",
        "mlHome": -235,
        "mlAway": 190,
        "spreadHome": -1.5,
        "total": null,
        "capturedAt": "2025-10-07T22:55:02.000Z"
      }
    ],
    "draftkings": [
      {
        "bookmaker": "draftkings",
        "snapshotType": "early_opening",
        "source": "archive",
        "mlHome": -225,
        "mlAway": 185,
        "spreadHome": -1.5,
        "total": 5.5,
        "capturedAt": "2025-10-06T23:54:46.000Z"
      },
      {
        "bookmaker": "draftkings",
        "snapshotType": "opening",
        "source": "archive",
        "mlHome": -225,
        "mlAway": 185,
        "spreadHome": -1.5,
        "total": 5.5,
        "capturedAt": "2025-10-07T11:54:56.000Z"
      },
      {
        "bookmaker": "draftkings",
        "snapshotType": "closing",
        "source": "archive",
        "mlHome": -238,
        "mlAway": 195,
        "spreadHome": -1.5,
        "total": 6.5,
        "capturedAt": "2025-10-07T22:55:06.000Z"
      }
    ],
    "...": "6 more bookmakers"
  }
}

What to do next

  • get_odds (10 credits). Opening and closing lines by bookmaker as a flat list, for one game or a whole season.
  • get_game_detail (10 credits). The result and goalie starts, to grade the move.

The data this uses

Every row above comes from NHL historical odds and closing lines. Moneyline, puck line and total for every NHL game since 2019-20, by sportsbook: 16 to 18 books a game to 2023-24, 8 since, 60+ on about 300 in 2025-26. REST or MCP.

More guides

The same guide for other sports

The latest lines from every book are on the odds board. Rather ask Claude? 31 free Claude skills call these endpoints for you.

Start with 500 free credits every month

No card. REST or MCP.