Metadata-Version: 2.4
Name: clutchapi
Version: 0.1.0
Summary: Official client for the CLUTCH sports odds API: live odds and player props from 30+ books, line movement, closing lines, CLV, arbitrage and webhooks.
Author: Cooper Tech Solutions LLC
License: MIT
Project-URL: Homepage, https://api.clutchbets.online
Project-URL: Documentation, https://api.clutchbets.online/docs
Keywords: sports betting,odds api,player props,sportsbook,nfl odds,nba odds,line movement,closing line value,arbitrage
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# clutchapi

The official Python client for the [CLUTCH API](https://api.clutchbets.online): live odds and player props from 30+ sportsbooks, line movement, closing lines, CLV grading, arbitrage and webhooks. Standard library only.

```bash
pip install clutchapi
```

```python
from clutchapi import Clutch

clutch = Clutch("ck_live_...")   # or set CLUTCH_API_KEY

nfl = clutch.odds("nfl")
props = clutch.props("nba", market="points")
steam = clutch.steam(sport="nfl")
close = clutch.closing(sport="nfl", game_key="...", market="spread")
```

Get a key at [api.clutchbets.online/console](https://api.clutchbets.online/console).

## Live stream

```python
for event, data in clutch.stream(sport="nba"):
    print(event, data)
```

## Line-move webhooks

```python
out = clutch.alerts.create(channel="webhook", url="https://your.app/hooks/clutch",
                           book="pinnacle", sport="nfl", min_move=1)
secret = out["secret"]   # shown once, save it
```

Verify each delivery (Flask example, raw body):

```python
from clutchapi import verify_webhook

@app.post("/hooks/clutch")
def hook():
    if not verify_webhook(request.get_data(), request.headers.get("X-Clutch-Signature"), SECRET):
        return "", 401
    moves = request.get_json()["moves"]
    return "", 200
```

## Errors and limits

Failed requests raise `ClutchError` with `.status` and `.body`. After every call, `clutch.last_limits` holds your rate-limit and monthly-quota headers.

Any endpoint is reachable directly with `clutch.get("/api/v1/...", {...})`. Full reference: [api.clutchbets.online/docs](https://api.clutchbets.online/docs).

MIT © Cooper Tech Solutions LLC
