Skip to Content
API ReferenceClosing Odds by Date

Historical Closing Odds

Retrieve the closing odds captured for all events on a specific date — the last pre-match price from each sportsbook before a game went live, with Power-devigged no-vig probabilities.

GET /api/v1/historical/odds/closing

Sharp tier or higher required. Pro and lower tiers receive a 403 tier_restricted error. This endpoint is gated by the closing_lines feature.

Phase 1 data window: Closing lines are captured in real-time on isLive false→true transitions. Valkey retains 30 days of data. Requesting a date older than 30 days will return an empty result.

Authentication

Requires API key. Sharp tier or higher required (closing_lines feature).

Query Parameters

ParameterTypeRequiredDescription
datestringYesDate in YYYY-MM-DD format (UTC).
sportstringYesSport identifier, e.g. basketball, football, ice_hockey.
leaguestringYesLeague identifier, e.g. nba, nfl, nhl.

All three parameters are required. The response is filtered to events matching the exact sport and league on that UTC date.

Date Window

Sharp tier allows up to 30 days of lookback. Requesting a date beyond your tier window returns a 403 tier_restricted error with the allowed window size.

Example Requests

# NBA closing lines for April 10 curl -X GET "https://api.sharpapi.io/api/v1/historical/odds/closing?date=2026-04-10&sport=basketball&league=nba" \ -H "X-API-Key: YOUR_API_KEY" # NFL closing lines curl -X GET "https://api.sharpapi.io/api/v1/historical/odds/closing?date=2026-04-06&sport=football&league=nfl" \ -H "X-API-Key: YOUR_API_KEY"

Response

Success (200)

{ "success": true, "data": { "date": "2026-04-10", "sport": "basketball", "league": "nba", "events": [ { "event_id": "evt_nba_bos_mia_20260410", "sport": "basketball", "league": "nba", "home_team": "Boston Celtics", "away_team": "Miami Heat", "event_start_time": "2026-04-10T18:00:00Z", "first_captured_at": "2026-04-10T17:58:12.000000000Z", "books": [ { "book": "pinnacle", "captured_at": "2026-04-10T17:58:12.000000000Z", "lines": [ { "market_type": "moneyline", "selection": "Boston Celtics", "selection_type": "home", "line": null, "odds_american": -145, "odds_decimal": 1.690, "implied_probability": 0.5920, "no_vig_probability": 0.5813 }, { "market_type": "moneyline", "selection": "Miami Heat", "selection_type": "away", "line": null, "odds_american": 125, "odds_decimal": 2.250, "implied_probability": 0.4444, "no_vig_probability": 0.4187 }, { "market_type": "point_spread", "selection": "Boston Celtics", "selection_type": "home", "line": -3.5, "odds_american": -110, "odds_decimal": 1.909, "implied_probability": 0.5238, "no_vig_probability": 0.5000 } ] }, { "book": "draftkings", "captured_at": "2026-04-10T17:57:44.000000000Z", "lines": [ { "market_type": "moneyline", "selection": "Boston Celtics", "selection_type": "home", "line": null, "odds_american": -140, "odds_decimal": 1.714, "implied_probability": 0.5833, "no_vig_probability": 0.5730 }, { "market_type": "moneyline", "selection": "Miami Heat", "selection_type": "away", "line": null, "odds_american": 118, "odds_decimal": 2.180, "implied_probability": 0.4587, "no_vig_probability": 0.4270 } ] } ] } ], "total_events": 5, "total_lines": 48 }, "meta": { "source": "valkey:closing_line", "tier_window_days": 30, "filters": { "sport": "basketball", "league": "nba", "date": "2026-04-10" }, "updated_at": "2026-04-17T20:00:00.000000000Z" } }

Error Responses

400 Validation Error

{ "error": { "code": "validation_error", "message": "date parameter is required in YYYY-MM-DD format" } }

403 Tier Restricted (wrong tier)

{ "error": { "code": "tier_restricted", "message": "The 'closing_lines' feature requires Sharp or higher.", "required_tier": "sharp", "docs": "https://docs.sharpapi.io/en/pricing" } }

403 Tier Restricted (date too old)

{ "error": { "code": "tier_restricted", "message": "Your sharp plan allows historical data up to 30 days back", "tier": "sharp", "docs": "https://sharpapi.io/pricing" } }

Response Fields

data object

FieldTypeDescription
datestringThe requested date (YYYY-MM-DD)
sportstringSport filter applied
leaguestringLeague filter applied
eventsarrayClosing line events matching the date, sport, and league
total_eventsintegerNumber of events in the response
total_linesintegerTotal number of individual closing lines across all events and books

Event object

FieldTypeDescription
event_idstringUnique event identifier
sportstringSport
leaguestringLeague
home_teamstringHome team name
away_teamstringAway team name
event_start_timestringISO 8601 scheduled start time
first_captured_atstringISO 8601 timestamp of the first closing line capture for this event
booksarrayPer-book closing line payloads

Book object

FieldTypeDescription
bookstringSportsbook identifier
captured_atstringISO 8601 timestamp when this book’s closing line was captured
linesarrayArray of closing line entries for this book

Closing line entry

FieldTypeDescription
market_typestringMarket type: moneyline, point_spread, total_points, etc.
selectionstringSelection label (team name, Over/Under, player)
selection_typestringhome, away, over, under, etc.
linenumber|nullSpread or total value (-3.5, 220.5). null for moneylines.
player_namestringPlayer name for player props (omitted otherwise)
stat_categorystringStat type for player props (omitted otherwise)
odds_americanintegerAmerican odds at close
odds_decimalnumberDecimal odds at close
implied_probabilitynumberRaw implied probability (with vig)
no_vig_probabilitynumber|nullPower-devigged fair probability (0.0–1.0). Present for 2- and 3-way markets; null for single-selection markets.
timestampstringISO 8601 timestamp of the odds record used for capture

meta object

FieldTypeDescription
sourcestringAlways "valkey:closing_line" (Phase 1 backend)
tier_window_daysintegerMaximum lookback days for your tier (Sharp = 30)
updated_atstringISO 8601 response timestamp

Use Cases

CLV analysis: Compare no_vig_probability values across books against Pinnacle. A soft book with a higher no_vig_probability on the favorite closed looser — positive CLV for bettors who took that side.

Line shopping audit: Retrieve closing lines across all books to understand where value was available at close.

Model calibration: Use implied_probability and no_vig_probability as historical ground truth for calibrating your own probability models.

Last updated on