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=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.0.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.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zenhodl-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 db76ec9cea3cf724e8ba5aeaa930724cd8135eaa605f4f76738c8974d05e34c8
MD5 fa0a19b47082e92cdce695a98737f3cd
BLAKE2b-256 8786b911d9b08d85969b1b627ceb2bcb3e61271ba8cedf69d16b8c886e314038

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zenhodl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 124aadb61a19c1451dd2bfde33428b244aa66b981f509f8fbd92b0cfee819ca5
MD5 3ef24be497ef61a953a5f7fbfdec11ed
BLAKE2b-256 01208f736caa0a83d8f214fc828a1b4d631862b2ebbf160eece5bc3b6159eb2c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

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