Answer

How to get historical closing lines

Pulling final pregame prices per event, market, and book for CLV analysis and backtesting, including CSV export.

How do I get historical closing lines?

Call GET /v1/historical/sports/{sport_key}/closing-odds to get final pregame prices per event, market, and book, the standard reference for closing line value. ParlayAPI's archive holds 1.7M+ closing game lines with continuous coverage back to 2005, plus 30M+ prop closing lines since June 2022, with CSV export at /v1/historical/closing-lines.csv.

More detail

A closing line is the last price a book published before an event started, and it is the benchmark that makes model evaluation honest: beating the close consistently is the strongest simple predictor that an edge is real. The closing-odds endpoint returns those final prices keyed by event, market, and book, so CLV grading is a join rather than a reconstruction.

For bulk analysis, /v1/historical/closing-lines.csv and its JSON twin export slices of the archive directly into pandas or a warehouse without pagination code. Pinnacle closing lines get dedicated treatment via /pinnacle-coverage, since sharp closes are the reference most modelers grade against.

Depth varies by sport and book: game line coverage is continuous back to 2005, and prop closing lines run from June 2022. Check /v1/historical/sports/{sport_key}/coverage first so your analysis window matches what the archive actually holds.

Endpoint

GET /v1/historical/sports/{sport_key}/closing-odds

curl 'https://parlay-api.com/v1/historical/sports/americanfootball_nfl/closing-odds?markets=h2h,spreads,totals' -H 'X-API-Key: YOUR_KEY'

Why developers use it

FAQ

What exactly counts as the closing line?

The final price a specific book published before commence time. ParlayAPI stores it per book rather than as a blended number, because a blend is not a price anyone could bet.

Can I export closing lines in bulk?

Yes. /v1/historical/closing-lines.csv and /v1/historical/closing-lines.json export filtered slices of the archive for direct loading into analysis tools.

Do you have prop closing lines?

Yes, 30M+ prop closing lines archived since June 2022, alongside 1.7M+ game closing lines with continuous coverage back to 2005.

Related

/answers/closing-line-api/answers/backtest-betting-model/historical-coverage/glossary/closing-line