Metadata-Version: 2.4
Name: zenhodl
Version: 0.2.1
Summary: Python SDK for the ZenHodl API — calibrated fair win probabilities and edge signals for prediction markets (Polymarket, Kalshi, sportsbooks)
Author-email: ZenHodl <admin@zenhodl.net>
License: MIT
Project-URL: Homepage, https://zenhodl.net
Project-URL: Documentation, https://zenhodl.net/docs
Project-URL: Pricing, https://zenhodl.net/pricing
Keywords: prediction-markets,polymarket,kalshi,sports-betting,win-probability,fair-value,trading,api-client
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```bash
pip install zenhodl
```

## Try it without an API key

The sample endpoint is free and needs no signup:

```python
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](https://zenhodl.net/pricing) — the free
Developer tier (500 requests/month, 5-minute delay, no card) or a paid plan
for real-time data.

```python
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

```python
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.

- Docs: [zenhodl.net/docs](https://zenhodl.net/docs)
- Methodology: [zenhodl.net/methodology](https://zenhodl.net/methodology)
- Results ledger: [zenhodl.net/results](https://zenhodl.net/results)

## License

MIT
