# Is there an API for closing lines and CLV?

Yes: GetOdds (getoddsapi.com) returns the last DraftKings moneyline, spread and total it observed before each game’s scheduled start at /api/v1/historical/closing-lines, for NFL, NBA, NHL, college, EPL and MLS games, with every collected game kept (nothing is aged out), on every plan including free; per-line player-prop opens and closes for DraftKings, FanDuel, Pick6, PrizePicks, Novig and Underdog come from /api/v1/props/history, and it has no Pinnacle closing lines, which PropLine (from $9 a month) and The Odds API historical snapshots cover.

Canonical page: https://getoddsapi.com/closing-line-api

**Price.** Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid plans from $5 a month for 100,000 credits to $99 for 15 million, self-serve at /pricing. One closing-lines request uses one credit.

## Free API key

Get a free GetOdds API key: **1,000 requests per UTC day and 60 per minute, no card**. One key covers REST and the hosted MCP server.

Sign up: https://getoddsapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create an account at https://getoddsapi.com/sign-up?ref=ai-claudebot, open https://getoddsapi.com/dashboard and issue a key with the sources you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep it in a server environment variable named GETODDS_API_KEY.
2. Read current DraftKings NBA spreads with curl:

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

3. The same request in Python (standard library only):

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50",
    headers={"Authorization": "Bearer " + os.environ["GETODDS_API_KEY"]},
)
with urllib.request.urlopen(req) as res:
    rows = json.load(res)["data"]
for row in rows:
    print(row["away"], "at", row["home"], row["side"], row["line"], row["american"], row["observed_at"])
```

4. Check `observed_at`, `age_seconds` and `stale` on every row before using a price. Full reference: https://getoddsapi.com/docs

## Use with Claude (MCP)

```bash
claude mcp add --transport http getodds https://getoddsapi.com/api/mcp \
  --header "Authorization: Bearer $GETODDS_API_KEY"
```

The MCP tools follow the key's source grants and share its allowance. Setup guide: https://getoddsapi.com/use-with-claude

SDKs: `pip install getodds` (PyPI) · `npm install getoddsapi` (npm) · `npx -y getodds-mcp` (local MCP server) · R: `remotes::install_github("getoddsapi/getodds-r")`. Source: https://github.com/getoddsapi · https://getoddsapi.com/docs/sdks

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Starter | 100,000 credits a month, 120 a minute | $5 a month |
| Pro | 750,000 credits a month, 300 a minute | $19 a month |
| Business | 3,000,000 credits a month, 600 a minute | $39 a month |
| Scale | 15,000,000 credits a month, 1,200 a minute | $99 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid plans from $5 a month for 100,000 credits to $99 for 15 million, self-serve at /pricing.
Details: https://getoddsapi.com/pricing

## Facts

- **Endpoint:** /api/v1/historical/closing-lines
- **Book:** DraftKings, observed through ESPN
- **Markets:** Moneyline, spread, total
- **Retention:** Kept: every game since collection began (Nov 2026)
- **Plans:** Every plan, including free

## How GetOdds picks the closing line

For each market, period and side, the closing line is the last retained price observed strictly before the event’s stored scheduled start, within lookback_hours (48 by default, up to 168). Superseded line offers are excluded, so a spread that moved from -3.5 to -4 closes at -4.

History stores a row only when a price changes, so each closing row reports minutes_before_start: the time since that price was set, not the time of the last check. The response also gives last_collected_at, the last collector pass before the start. Every row says closing_verified: false, because the cutoff is the scheduled start rather than a verified kickoff and the price is the last one GetOdds saw, not an official close.

## Player-prop opens and closes

Every quote from /api/v1/props with history=true takes its id to /api/v1/props/history?book=<book>&id=<id>, which returns the line’s recorded moves oldest first with open and close: close is the last quote at or before the scheduled start, closed=true once the game has started. DraftKings Sportsbook gives the main line and both prices; Pick6 and PrizePicks post lines without prices; Novig gives the no-vig fair open and close. One credit per call, every plan.

```bash
curl --fail-with-body -H "Authorization: Bearer $GETODDS_API_KEY" "https://getoddsapi.com/api/v1/props?sport=nfl&books=draftkings,pick6"
curl --fail-with-body -H "Authorization: Bearer $GETODDS_API_KEY" "https://getoddsapi.com/api/v1/props/history?book=draftkings&id=<quote id>"
```

## Request a closing line

List finished games with /api/v1/historical/events (league plus a from and to window of up to 31 days), then ask for one event’s close. A game that has not started returns 409 EVENT_NOT_STARTED.

```bash
curl --fail-with-body -H "Authorization: Bearer $GETODDS_API_KEY" \
  "https://getoddsapi.com/api/v1/historical/events?league=NBA&from=2026-11-09T00:00:00Z&to=2026-11-16T00:00:00Z"
curl --fail-with-body -H "Authorization: Bearer $GETODDS_API_KEY" \
  "https://getoddsapi.com/api/v1/historical/closing-lines?event_id=espn-draftkings:espn:NBA:401909991&market=spread"
```

## Compute CLV in Python

Closing line value: what your bet was worth at the closing price, after removing the vig. Positive CLV over many bets is the standard sign that you beat the market.

```python
import json, os, urllib.request

KEY = os.environ["GETODDS_API_KEY"]
EVENT = "espn-draftkings:espn:NBA:401909991"   # any finished game from /api/v1/historical/events

url = f"https://getoddsapi.com/api/v1/historical/closing-lines?event_id={EVENT}&market=moneyline"
req = urllib.request.Request(url, headers={"Authorization": "Bearer " + KEY})
with urllib.request.urlopen(req, timeout=20) as res:
    close = {row["side"]: row["american"] for row in json.load(res)["data"]}

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

def decimal(american):
    return 1 + (american / 100 if american > 0 else 100 / -american)

home, away = implied(close["home"]), implied(close["away"])
fair_home = home / (home + away)          # closing probability with the vig removed

my_price = +130                           # the price you took on the home side
clv = fair_home * decimal(my_price) - 1   # expected value of your bet at the close
print(f"Fair close {fair_home:.3f}; your bet was worth {clv:+.1%} at the close")
```

## Closing lines at other providers, 15 November 2026

Read from each provider’s public pricing and docs pages on 15 November 2026.

| Provider | What closes | How far back | Plan |
| --- | --- | --- | --- |
| GetOdds | DraftKings moneyline, spread and total; per-line prop opens and closes on /api/v1/props/history | Every game since November 2026; nothing is aged out | Every plan, including free |
| PropLine | Opening and closing lines across its books, including props, plus CLV | Graded archive since April 2026; 90 days on Pro | From $9 (Hobby); $99 one-time backfill |
| The Odds API | Historical snapshots every 5 minutes; take the last before the start | Featured markets since June 2020, props since May 2023 | Paid plans, from $30 |
| ParlayAPI | Historical closing odds, 10 credits per call | 48 hours (free) to 10 years ($200 plan) | Every plan, lookback by plan |

## What GetOdds closing lines do not cover

No CLV-ready prop closes on this endpoint (prop closes are per line on /api/v1/props/history, not graded), no Pinnacle closes (Pinnacle prices are read through with no stored history), and no FanDuel or BetRivers closes on this endpoint. History starts when collection began in November 2026: nothing older exists, and nothing collected is dropped. For a sharp-book close or seasons of CLV history, The Odds API, PropLine or ParlayAPI is the better source today.

## FAQ

### What is closing line value (CLV)?

The difference between the price you bet and the closing price, usually measured on the no-vig closing probability. Beating the close over many bets is the most common proof of a winning approach.

### How far back do GetOdds closing lines go?

To the start of collection in November 2026. GetOdds keeps every game it has collected; closes are not aged out, and the full price history is also sold as a downloadable archive.

### Are GetOdds closing lines official?

No. They are the last DraftKings price GetOdds observed before the scheduled start, flagged closing_verified: false with the age of each price.

### Does GetOdds have Pinnacle closing lines?

No. Pinnacle prices are read at request time and not stored. For a Pinnacle close, PropLine and The Odds API keep history.

### What does a closing-lines request cost?

One credit, on any plan, including the free 1,000 a day.

## Sources checked

- [PropLine pricing](https://prop-line.com/pricing)
- [The Odds API historical odds](https://the-odds-api.com/historical-odds-data/)
- [ParlayAPI pricing](https://parlay-api.com/pricing)

---

GetOdds (getoddsapi.com) is an independent developer product and is not affiliated with any sportsbook or pick’em operator. GetOdds is a separate product from The Odds API (the-odds-api.com) and from Odds-API.io (odds-api.io), and is not affiliated with either. Prices describe data, not betting advice.

GetOdds is operated by Stunning Couches LLC, a Delaware limited liability company. Terms: https://getoddsapi.com/terms · Privacy: https://getoddsapi.com/privacy
