Build a daily NBA archive.
Backfill player points, rebounds and assists. Archive observed PrizePicks closing lines and their grades separately, then revisit recent dates as results settle.
Download Python archive client
Choose the history you need
| Archive | Request | Stored data |
|---|---|---|
| NBA player game logs | /api/v1/game-logs?league=NBA&date=2023-10-24&limit=200 | One player per game; stats.points, stats.rebounds, stats.assists |
| PrizePicks results | /api/v1/results?league=NBA&date=2026-11-02&stat=Points&limit=200 | Observed closing line, outcome, grading status and revision |
Database check on November 3, 2026: NBA player game logs span October 24, 2023–November 2, 2026 (110,025 stored player-game rows). NBA PrizePicks result records span October 28–November 2, 2026. These are observed range bounds, not a claim that every game or market is present. A separate partial first-party snapshot of 221 NBA lines has been recovered from October 27 at 22:55:20 UTC and is available through historical board and per-projection history reads. This does not establish October 27 grading coverage or a complete earlier season. Older box scores do not supply older PrizePicks lines. Check response coverage metadata and coverage for current availability.
League-wide historical game logs and the full available historical dataset require Developer or Production access. Free samples and plan-limited results cannot validate a complete archive. The client stops on an access gate or plan-limit marker; it never works around an allowance.
Run bounded backfills and daily updates
export PRIZEPICKS_API_KEY='your saved key' # Download the Python client using the link above; Python 3.10+, no dependencies. # One historical box-score day. Repeat in explicit windows of at most 31 days. python3 daily-nba-archive.py --dataset game-logs --start 2023-10-24 --end 2023-10-24 # One observed PrizePicks day; Points, Rebounds and Assists, every grading status. python3 daily-nba-archive.py --dataset results --start 2026-11-02 --end 2026-11-02 # Daily maintenance: re-read the previous five Eastern game dates. python3 daily-nba-archive.py --db nba-archive.sqlite # Optional: all available NBA markets instead of just PTS/REB/AST. python3 daily-nba-archive.py --dataset results --all-markets --start 2026-11-02 --end 2026-11-02
Run from your own server or computer with a saved API key. The default makes at most 100 HTTP requests, including retries, at one request at a time. Narrow the date range if the budget is reached. A slice is saved only after all its pages arrive; completed slices remain saved, and rerunning safely updates their rows. The script does not create an unattended service for you.
- Schedule one daily run after the prior day’s games, with no overlapping runs against the same SQLite file. Defaults use yesterday and the four preceding dates in
America/New_York, including daylight-saving changes. - Follow
meta.next_cursorwith every filter unchanged. Game logs are newest first; result sequence cursors increase. Neither is a change feed or a frozen snapshot. Restart each date at page one on the next run, so a corrected older sequence is not missed. - The SQLite file keeps complete API rows. Game logs upsert by game and player ID; result records upsert by projection ID. Revisions, source times, confidence, grading reasons and side information stay in the saved JSON.
- Read the
nba_points_rebounds_assistsSQL view for stats, andgraded_prizepicksfor records whose latest status is graded. The underlying result archive also keeps void and ungraded records. Never turn either status into a loss or a zero. - Missing stat fields remain SQL NULL, including rebounds or assists that the source did not report. A true recorded zero remains zero.
- Keep a periodic deeper date replay for late corrections. Five days covers the usual box-score confirmation re-read, approximately four days after a game; it is not a promise that every future revision arrives within five days. Track ungraded and unconfirmed rows separately.
Game date, observation time and capture time
date selects the US Eastern game date, not the date your script downloaded the row. A game ending after midnight UTC still belongs to its Eastern game date. starts_at is the event timestamp. For results, closing.observed_at is the last line observation before the start, and closing.gap_seconds reports its distance from that start. It is not proof of the final platform line immediately before lock.
The client adds captured_at, the UTC download time, without overwriting source timestamps. graded_at, updated_at and revision describe grading and corrections. The archive_reads table records finished API traversals, including empty slices; finishing pagination does not prove source completeness or final grading.
For flat training rows use training-set; it excludes void rows by default and uses from/to for date ranges. Game logs use start_date/end_date. Results use a single date per traversal. This client uses daily results without a status filter to preserve later status changes.
Every request sends the fixed task summary “Maintain a daily NBA points rebounds assists and observed graded-line archive.” It includes no private prompt or personal information. Keep keys in your environment and archives on storage you control.