Skip to main content

getodds (Python)

Python client for the GetOdds sports odds API: DraftKings, FanDuel and BetRivers sportsbook prices plus PrizePicks, Underdog and DraftKings Pick6 pick'em lines, with capture times on every row. No dependencies (standard library only), Python 3.10+.

pip install getodds

Try it with no key

The public boards need no account and use no credits. They return DraftKings prices (read through ESPN's odds data), cached for up to five minutes.

from getodds import public_board

board = public_board("nhl")          # nfl, nba, nhl, college-football, soccer-odds-api
for row in board["rows"][:2]:
    print(row["away"], "@", row["home"], row["market"], row["side"], row["american"], row["observed_at"])

Output from a real run on 15 Nov 2026 (05:50 UTC):

Edmonton Oilers @ Philadelphia Flyers moneyline away -155 2026-11-15T05:44:25.914Z
Edmonton Oilers @ Philadelphia Flyers moneyline home 130 2026-11-15T05:44:25.914Z

Prices move; your numbers will differ. From the shell: getodds board --sport nba (or python -m getodds board).

With a free key

Create a free key at https://getoddsapi.com/sign-up (1,000 requests a UTC day, 60 a minute, no card) and set it in the server environment:

export GETODDS_API_KEY=...   # never commit it
from getodds import GetOdds, GetOddsError

client = GetOdds()  # reads GETODDS_API_KEY

# DraftKings NBA moneylines, only rows captured recently
odds = client.odds(sport="NBA", market="moneyline", fresh_only=True, limit=10)

# Pick'em thresholds from PrizePicks or Underdog (the key needs that source granted)
lines = client.markets(source="prizepicks", limit=20)

# FanDuel native game markets
fd = client.fanduel_markets(league="NBA", limit=5)

try:
    client.history(event_id="espn-draftkings:espn:NBA:401909985")
except GetOddsError as err:
    print(err.code, err.status, err.retry_after)  # e.g. HTTP_ERROR 429 60

Each call makes one bounded request (20 s timeout, 2 MiB cap, no redirects) and validates the response contract. There are no automatic retries or pagination: pass offset (or the returned cursor) yourself. A successful data request uses one credit; failed reads use none.

Method Route
odds, events, history, sports, bookmakers, market_types DraftKings (via ESPN) stored odds
search_events, event, odds_multi, updated_odds, dropping_odds, leagues event search and change feeds
historical_events, odds_summary, replay, event_state, participants history, replay and metadata
markets(source=...) PrizePicks, Underdog, DraftKings Pick6 thresholds
fanduel_markets, outrights, outright_odds, live_events FanDuel native markets

Full reference: https://getoddsapi.com/docs and the OpenAPI spec at https://getoddsapi.com/openapi.json.

Tests

PYTHONPATH=. python3 -m unittest discover -s tests

Tests run offline against fixtures and a fake opener.

GetOdds is an independent developer product, not affiliated with any sportsbook. Operated by Stunning Couches LLC. MIT licensed.

Metadata

Release files for getodds 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getodds 0.5.0
File Size Uploaded Provenance Actions
getodds-0.5.0.tar.gz 18.1 kB With provenance Details for getodds-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for getodds 0.5.0
File Interpreter ABI Platform Actions
getodds-0.5.0-py3-none-any.whl Python 3 none any Details for getodds-0.5.0-py3-none-any.whl

Total release size: 30.3 kB

Release files / getodds-0.5.0.tar.gz

Download URL getodds-0.5.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8361cd9c578153804ca06d316b1d98aeaf15f4127a3f1a709ce84d8cdf2d962a
BLAKE2b-256 checksum
How to use checksums
92373078fa09ffe9ab6eb87e514d51888d1f4c7b2d7d846511264d41f1f82587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / getodds-0.5.0-py3-none-any.whl

Download URL getodds-0.5.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2023950244cc82a24612a81bf7a93dfcdac2eea7ca69155679a4faf190afa5a
BLAKE2b-256 checksum
How to use checksums
3a4c7f3090f49aec11bdb79ee92eeb371fdb25f3104105482ec1287821eeccd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for getodds 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for getodds-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page