# Last observed pre-start odds

Read retained DraftKings offer observations from the final fifteen minutes before the currently stored scheduled start, without claiming official closing prices.

Canonical page: https://getoddsapi.com/docs/closing-lines

## 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

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 1,000 requests a day, 60 a minute | $0, no card |
| Developer Bundle | 10,000 requests or credits a month on each of four sources | $149 a month |

Free development allowance: 1,000 requests per UTC day and 60 per minute per account, with no payment step. Paid: the Developer Bundle at $149 per month, with 10,000 monthly requests or credits on each of four sources.
Details: https://getoddsapi.com/bundle

## Guide


Canonical: https://getoddsapi.com/docs/closing-lines
Reviewed: 2026-11-07 UTC

Read retained DraftKings offer observations from the final fifteen minutes before the currently stored scheduled start, without claiming official closing prices.

## Read one bounded historical page

GET /api/v1/historical/closing-lines requires event_id, a DraftKings bearer grant, and DraftKings selected in the account bookmaker preferences. Optional market is moneyline, spread or total; limit is 1–200 and offset 0–10000. One successful page costs one credit. Use a stored source-native event identity from the events API.

A future stored scheduled start returns 409 EVENT_NOT_STARTED. Unknown stored event IDs return 404. Known events with no matching retained capture return 200 and an empty data array. Nothing is synthesized from current offers or older prices.

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/historical/closing-lines?event_id=espn-draftkings:espn:NBA:123&limit=20" -H "Authorization: Bearer $GETODDS_API_KEY"
```

## Understand exactly what is selected

For each offer, select the last retained snapshot observed in the fifteen minutes preceding the current stored scheduled start. The lower boundary is inclusive; the start itself is excluded. History outside the last seven days is never read. Equal observation timestamps use the greatest source history sequence as a deterministic tie-break.

cutoff is the current stored scheduled start. observed_at is the retained capture clock, and lag_seconds measures how far that observation precedes cutoff. Rows preserve string sequence IDs, source offer IDs and prices. The fixed window is not widened when captures are missing. A partial window at the retention boundary is marked window_within_retention=false. This flag only compares the window with the retention boundary; it does not establish that every observation was captured or preserved.

## Respect schedule and coverage limits

closing_verified=false, official_closing_price=false and actual_start_verified=false are explicit. This endpoint does not establish the last bookmaker quote, actual kickoff, or a complete collection. Stored history records changes, so an unchanged but still-offered quote may have no observation inside the window and therefore is absent.

The event store contains its current scheduled start, not historical schedule revisions. If that stored start moves, a later request uses the changed cutoff. schedule_history_available=false and schedule_observed_at disclose this limitation. Each SQL request observes one database snapshot; offset pages are not a frozen cross-request snapshot.

jurisdiction_available=false: the retained ESPN/DraftKings adapter does not establish state-specific or account-specific availability. Jurisdiction filters are rejected rather than silently ignored. Results do not imply sportsbook settlement, a closing-line-value return, or a betting recommendation.

## Questions

### Are these official closing lines?

No. These are last retained observations inside a fixed pre-scheduled-start window. Official bookmaker closing and actual kickoff are not verified.

### Why can an event have no rows?

No eligible capture may exist, a market filter or page offset may exclude rows, or the event cutoff may be outside the seven-day retained window. No stale replacement price is supplied.

### Does a changed scheduled start change results?

Yes. Selection uses the event’s currently stored scheduled start. This endpoint does not retain or reconstruct schedule revisions.

## Sources

- [Event identity and scheduled-state metadata](https://getoddsapi.com/docs/event-metadata)
- [Retained replay contract](https://getoddsapi.com/docs/odds-replay)
- [Bookmaker selection](https://getoddsapi.com/docs/bookmaker-selection)

Independent product; not affiliated with the operators named. No picks or predicted profits.

---

GetOdds is an independent developer product and is not affiliated with any sportsbook or pick’em operator. Prices describe data, not betting advice.
