Skip to main content

ZenHodl Python SDK

Calibrated fair win probabilities and edge signals for prediction markets — Polymarket, Kalshi, and sportsbooks — across 8 sports (NBA, WNBA, NCAAMB, NCAAWB, CFB, NFL, NHL, MLB).

Zero dependencies (standard library only). Built-in timeouts and retry with exponential backoff.

Install

pip install zenhodl

Try it without an API key

The sample endpoint is free and needs no signup:

from zenhodl import ZenHodl

client = ZenHodl()               # keyless — sample + health only
sample = client.edges_sample()   # delayed sample of the live edge feed
print(sample["count"], "signals")

Full access

Get a key from zenhodl.net/pricing — the free Developer tier (500 requests/month, 5-minute delay, no card) or a paid plan for real-time data.

from zenhodl import ZenHodl

client = ZenHodl("sk_live_...")

# Games where the model disagrees with the market by ≥10 cents
edges = client.edges(min_edge=10)
for e in edges["signals"]:
    print(e)

# All live games with fair win probabilities
games = client.games(sport="MLB")

# Available sports + model metadata
sports = client.sports()

# Predictions CSV (bytes)
csv_bytes = client.predictions("latest")

# Backtests (Pro tier and above)
result = client.backtest(sport="NBA", min_edge_c=8)

Configuration

client = ZenHodl(
    "sk_live_...",
    timeout=15.0,   # per-request timeout, seconds
    retries=2,      # retry on 429/5xx/network errors (exponential backoff)
)

Errors raise zenhodl.ZenHodlError with .status and .detail.

What this is (and isn't)

ZenHodl publishes calibrated model probabilities and compares them with live venue prices, with public methodology and a results ledger that includes losses. It is a research and monitoring API — not a source of guaranteed profitable picks, and nothing here is financial advice.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenhodl-0.2.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zenhodl-0.2.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file zenhodl-0.2.1.tar.gz.

File metadata

  • Download URL: zenhodl-0.2.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for zenhodl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 655d0c4a64ac6f17074969b89cf689004a57cddfa83c2859f7f9407ebe23a25e
MD5 ec7028b3599d431acd581d9d051cff85
BLAKE2b-256 2071af335237a53b8419f04c01a12e687656236fe0488c003728e395de539909

See more details on using hashes here.

File details

Details for the file zenhodl-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: zenhodl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for zenhodl-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d7b4427079b8a59160f75cb0093daddd6e2a5c40cd103281397d5e5c6e6d62
MD5 cf6363ddac7f6a7563ad9c238cb9234a
BLAKE2b-256 84a263437212f8f086138264cd23e506ab9dd51a0bcabe593edd9a03b118af8e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page