pinnapi 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pinnapi-0.1.0/.gitignore +86 -0
- pinnapi-0.1.0/LICENSE +21 -0
- pinnapi-0.1.0/PKG-INFO +99 -0
- pinnapi-0.1.0/README.md +72 -0
- pinnapi-0.1.0/pyproject.toml +42 -0
pinnapi-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# ═══ Production repo — what NOT to track ═══
|
|
2
|
+
|
|
3
|
+
# Dependencies
|
|
4
|
+
node_modules/
|
|
5
|
+
|
|
6
|
+
# Local SaaS data (SQLite, logs)
|
|
7
|
+
data/
|
|
8
|
+
*.db
|
|
9
|
+
*.db-journal
|
|
10
|
+
*.db-shm
|
|
11
|
+
*.db-wal
|
|
12
|
+
*.log
|
|
13
|
+
|
|
14
|
+
# Pinnacle session + auth tokens (contain secrets)
|
|
15
|
+
session*.json
|
|
16
|
+
|
|
17
|
+
# Blog content published at runtime via the admin SEO Builder. Written on the
|
|
18
|
+
# live server (markdown source + manifest), NOT via git. Untracked files
|
|
19
|
+
# survive the deploy webhook's `git reset --hard`, so posts persist across
|
|
20
|
+
# deploys. Sitemap/RSS/index/post HTML are all rendered on the fly from these.
|
|
21
|
+
content/blog/
|
|
22
|
+
fresh_token.*
|
|
23
|
+
login_body.json
|
|
24
|
+
login_probe.json
|
|
25
|
+
|
|
26
|
+
# Ad-hoc monitor captures / snapshots
|
|
27
|
+
manual_monitor_report.json
|
|
28
|
+
live_monitor_report.json
|
|
29
|
+
monitor_stdout.log
|
|
30
|
+
manual_monitor.log
|
|
31
|
+
api-server.log
|
|
32
|
+
ws_diag.log
|
|
33
|
+
ws_messages.jsonl
|
|
34
|
+
live_odds.jsonl
|
|
35
|
+
pinnacle_sample.json
|
|
36
|
+
probe_detail.json
|
|
37
|
+
tennis_snapshot.json
|
|
38
|
+
js_chunks/
|
|
39
|
+
snapshots/
|
|
40
|
+
snapshots_tennis/
|
|
41
|
+
|
|
42
|
+
# Exploratory / reverse-engineering scratch (kept locally, not shipped)
|
|
43
|
+
.playwright-mcp/
|
|
44
|
+
*.py
|
|
45
|
+
__pycache__/
|
|
46
|
+
.venv/
|
|
47
|
+
ws_diag.js
|
|
48
|
+
ws_topic_scan.js
|
|
49
|
+
prematch_probe.js
|
|
50
|
+
probe_tennis.js
|
|
51
|
+
saas-test.js
|
|
52
|
+
tools/race/logs/
|
|
53
|
+
|
|
54
|
+
# Environment files (NOWPAYMENTS secrets, DB URLs)
|
|
55
|
+
.env
|
|
56
|
+
.env.*
|
|
57
|
+
|
|
58
|
+
# OS / editor cruft
|
|
59
|
+
.DS_Store
|
|
60
|
+
Thumbs.db
|
|
61
|
+
*.swp
|
|
62
|
+
*.swo
|
|
63
|
+
.idea/
|
|
64
|
+
.vscode/
|
|
65
|
+
|
|
66
|
+
# Local scratch / explorations / credentials
|
|
67
|
+
tmp/
|
|
68
|
+
.claude/
|
|
69
|
+
|
|
70
|
+
# ─── Bet-tracking WIP (uncommitted, not deployed) ───────────────────────────
|
|
71
|
+
# Local-only experiment from May 2026. Tied to a MariaDB setup we haven't
|
|
72
|
+
# stood up on the VPS yet. Keep the files around but hidden from git so they
|
|
73
|
+
# can't be accidentally pushed. To resume work, remove these lines.
|
|
74
|
+
drops/bet-scorer.js
|
|
75
|
+
drops/db-store.js
|
|
76
|
+
drops/mqtt-settler.js
|
|
77
|
+
drops/tests/bet-scorer.test.js
|
|
78
|
+
drops/tests/min-drop.test.js
|
|
79
|
+
drops/tests/mqtt-settler.test.js
|
|
80
|
+
public/bets.html
|
|
81
|
+
api-server.js.bak-with-uncommitted
|
|
82
|
+
banner-on-panel.png
|
|
83
|
+
|
|
84
|
+
# Installed agent skills (npx skills add ...) — local tooling, not product code
|
|
85
|
+
.agents/
|
|
86
|
+
skills-lock.json
|
pinnapi-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pinnapi (pinnapi.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pinnapi-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pinnapi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Real-time Pinnacle odds & drop alerts in Python — REST snapshots and SSE drop streams from pinnapi.com, the drop-in alternative to the closed Pinnacle API.
|
|
5
|
+
Project-URL: Homepage, https://pinnapi.com
|
|
6
|
+
Project-URL: Documentation, https://pinnapi.com/docs
|
|
7
|
+
Project-URL: API reference (LLM-friendly), https://pinnapi.com/llms-full.txt
|
|
8
|
+
Project-URL: Blog, https://pinnapi.com/blog
|
|
9
|
+
Author-email: pinnapi <info@pinnapi.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: arbitrage,betting,closing-line-value,dropping-odds,odds,odds-api,pinnacle,pinnacle-api,sports-betting,sse,steam-moves
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Requires-Dist: requests>=2.20
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# pinnapi — Pinnacle odds API for Python
|
|
29
|
+
|
|
30
|
+
Real-time **Pinnacle odds and drop alerts** in Python: REST snapshots of live + prematch markets, and Server-Sent-Events streams that push every odds drop to your code in **~15–40 ms**.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install pinnapi
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
> **Does Pinnacle still have a public API?** No — Pinnacle closed its public API on **July 23, 2025** (only bespoke commercial/academic access remains). [pinnapi.com](https://pinnapi.com) is an independent drop-in replacement: the same familiar response shape, served from its own real-time feed. No Pinnacle account needed — your API key is your login, and a free trial key takes seconds (no card).
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from pinnapi import Client, SPORTS
|
|
42
|
+
|
|
43
|
+
api = Client("YOUR_KEY") # free trial key at https://pinnapi.com/
|
|
44
|
+
|
|
45
|
+
# Live soccer markets (moneyline, spreads, totals, team totals — every period)
|
|
46
|
+
events = api.markets(sport_id=SPORTS["soccer"])
|
|
47
|
+
|
|
48
|
+
# Prematch instead of live
|
|
49
|
+
fixtures = api.prematch_fixtures(sport_id=SPORTS["tennis"])
|
|
50
|
+
|
|
51
|
+
# What just dropped? (queryable buffer, no open connection needed)
|
|
52
|
+
recent = api.drops(mode="live", min_drop_pct=5)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Real-time drop alerts (SSE)
|
|
56
|
+
|
|
57
|
+
Stream every market whose price falls past your threshold, the instant it happens — this is the feed for steam chasing, dropping-odds alerts, and arbitrage windows:
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
# Requires a plan with SSE (Drops / Edge / Scale)
|
|
61
|
+
for drop in api.stream_drops(mode="live", min_drop=5):
|
|
62
|
+
print(f'{drop["home"]} v {drop["away"]} · {drop["market"]} '
|
|
63
|
+
f'{drop["from"]} → {drop["to"]} (▼{drop["drop_pct"]}%)')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`mode="prematch"` streams pre-game drops (optional `recheck=N` holds an alert N seconds and re-verifies before sending). Reconnects automatically on network hiccups; auth/plan errors raise immediately.
|
|
67
|
+
|
|
68
|
+
## Why Pinnacle's line?
|
|
69
|
+
|
|
70
|
+
Pinnacle is the market's reference price — the sharp line the rest of the market follows. When it breaks, soft books take seconds to correct; everything in between is your window. A polled aggregator hears about the move on its next cycle; this feed is **push, not poll**.
|
|
71
|
+
|
|
72
|
+
## API surface
|
|
73
|
+
|
|
74
|
+
| Method | Endpoint | What it returns |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `markets(sport_id, event_type)` | `GET /kit/v1/markets` | Live (default) or prematch markets for a sport |
|
|
77
|
+
| `details(event_id)` | `GET /kit/v1/details` | One live event |
|
|
78
|
+
| `prematch_fixtures(sport_id)` | `GET /kit/v1/prematch/fixtures` | All prematch fixtures + markets |
|
|
79
|
+
| `prematch_markets(event_id)` | `GET /kit/v1/prematch/markets` | Markets for one prematch event |
|
|
80
|
+
| `prematch_lines(event_id)` | `GET /kit/v1/prematch/lines` | Compact line view |
|
|
81
|
+
| `drops(mode, ...)` | `GET /api/drops` | Recent dropping-odds buffer (filterable) |
|
|
82
|
+
| `stream_drops(mode, min_drop)` | SSE `/odds-drop[-prematch]` | Push stream of drop alerts |
|
|
83
|
+
| `health()` / `ping()` | `GET /health` / `/ping` | Service status / liveness |
|
|
84
|
+
|
|
85
|
+
**Sports** (`SPORTS` dict): soccer=1, tennis=2, basketball=3, hockey=4, football=5, baseball=6, rugby=7, mma=8, boxing=9, other=10, esports=11, golf=12.
|
|
86
|
+
|
|
87
|
+
**Errors:** `AuthError` (bad key / plan lacks the surface), `RateLimitError` (with `.retry_after` seconds), `PinnapiError` (everything else, with `.status` and `.payload`).
|
|
88
|
+
|
|
89
|
+
## Pricing & limits
|
|
90
|
+
|
|
91
|
+
Free trial: 100 REST requests/day, no card. Paid plans from **$99/mo** (SSE drop streams, 10–30 req/sec REST, raw WebSocket add-on). Full details: [pinnapi.com](https://pinnapi.com/#pricing) · [API docs](https://pinnapi.com/docs) · [LLM-friendly reference](https://pinnapi.com/llms-full.txt).
|
|
92
|
+
|
|
93
|
+
## Notes
|
|
94
|
+
|
|
95
|
+
- Real-time feed only (live + prematch) — no historical archive; buffer the stream yourself if you need history.
|
|
96
|
+
- One concurrent SSE connection per account per stream (live and prematch counted separately).
|
|
97
|
+
- pinnapi is an independent service, **not affiliated with or endorsed by Pinnacle**.
|
|
98
|
+
|
|
99
|
+
MIT licensed.
|
pinnapi-0.1.0/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# pinnapi — Pinnacle odds API for Python
|
|
2
|
+
|
|
3
|
+
Real-time **Pinnacle odds and drop alerts** in Python: REST snapshots of live + prematch markets, and Server-Sent-Events streams that push every odds drop to your code in **~15–40 ms**.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install pinnapi
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
> **Does Pinnacle still have a public API?** No — Pinnacle closed its public API on **July 23, 2025** (only bespoke commercial/academic access remains). [pinnapi.com](https://pinnapi.com) is an independent drop-in replacement: the same familiar response shape, served from its own real-time feed. No Pinnacle account needed — your API key is your login, and a free trial key takes seconds (no card).
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from pinnapi import Client, SPORTS
|
|
15
|
+
|
|
16
|
+
api = Client("YOUR_KEY") # free trial key at https://pinnapi.com/
|
|
17
|
+
|
|
18
|
+
# Live soccer markets (moneyline, spreads, totals, team totals — every period)
|
|
19
|
+
events = api.markets(sport_id=SPORTS["soccer"])
|
|
20
|
+
|
|
21
|
+
# Prematch instead of live
|
|
22
|
+
fixtures = api.prematch_fixtures(sport_id=SPORTS["tennis"])
|
|
23
|
+
|
|
24
|
+
# What just dropped? (queryable buffer, no open connection needed)
|
|
25
|
+
recent = api.drops(mode="live", min_drop_pct=5)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Real-time drop alerts (SSE)
|
|
29
|
+
|
|
30
|
+
Stream every market whose price falls past your threshold, the instant it happens — this is the feed for steam chasing, dropping-odds alerts, and arbitrage windows:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
# Requires a plan with SSE (Drops / Edge / Scale)
|
|
34
|
+
for drop in api.stream_drops(mode="live", min_drop=5):
|
|
35
|
+
print(f'{drop["home"]} v {drop["away"]} · {drop["market"]} '
|
|
36
|
+
f'{drop["from"]} → {drop["to"]} (▼{drop["drop_pct"]}%)')
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`mode="prematch"` streams pre-game drops (optional `recheck=N` holds an alert N seconds and re-verifies before sending). Reconnects automatically on network hiccups; auth/plan errors raise immediately.
|
|
40
|
+
|
|
41
|
+
## Why Pinnacle's line?
|
|
42
|
+
|
|
43
|
+
Pinnacle is the market's reference price — the sharp line the rest of the market follows. When it breaks, soft books take seconds to correct; everything in between is your window. A polled aggregator hears about the move on its next cycle; this feed is **push, not poll**.
|
|
44
|
+
|
|
45
|
+
## API surface
|
|
46
|
+
|
|
47
|
+
| Method | Endpoint | What it returns |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `markets(sport_id, event_type)` | `GET /kit/v1/markets` | Live (default) or prematch markets for a sport |
|
|
50
|
+
| `details(event_id)` | `GET /kit/v1/details` | One live event |
|
|
51
|
+
| `prematch_fixtures(sport_id)` | `GET /kit/v1/prematch/fixtures` | All prematch fixtures + markets |
|
|
52
|
+
| `prematch_markets(event_id)` | `GET /kit/v1/prematch/markets` | Markets for one prematch event |
|
|
53
|
+
| `prematch_lines(event_id)` | `GET /kit/v1/prematch/lines` | Compact line view |
|
|
54
|
+
| `drops(mode, ...)` | `GET /api/drops` | Recent dropping-odds buffer (filterable) |
|
|
55
|
+
| `stream_drops(mode, min_drop)` | SSE `/odds-drop[-prematch]` | Push stream of drop alerts |
|
|
56
|
+
| `health()` / `ping()` | `GET /health` / `/ping` | Service status / liveness |
|
|
57
|
+
|
|
58
|
+
**Sports** (`SPORTS` dict): soccer=1, tennis=2, basketball=3, hockey=4, football=5, baseball=6, rugby=7, mma=8, boxing=9, other=10, esports=11, golf=12.
|
|
59
|
+
|
|
60
|
+
**Errors:** `AuthError` (bad key / plan lacks the surface), `RateLimitError` (with `.retry_after` seconds), `PinnapiError` (everything else, with `.status` and `.payload`).
|
|
61
|
+
|
|
62
|
+
## Pricing & limits
|
|
63
|
+
|
|
64
|
+
Free trial: 100 REST requests/day, no card. Paid plans from **$99/mo** (SSE drop streams, 10–30 req/sec REST, raw WebSocket add-on). Full details: [pinnapi.com](https://pinnapi.com/#pricing) · [API docs](https://pinnapi.com/docs) · [LLM-friendly reference](https://pinnapi.com/llms-full.txt).
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
- Real-time feed only (live + prematch) — no historical archive; buffer the stream yourself if you need history.
|
|
69
|
+
- One concurrent SSE connection per account per stream (live and prematch counted separately).
|
|
70
|
+
- pinnapi is an independent service, **not affiliated with or endorsed by Pinnacle**.
|
|
71
|
+
|
|
72
|
+
MIT licensed.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pinnapi"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Real-time Pinnacle odds & drop alerts in Python — REST snapshots and SSE drop streams from pinnapi.com, the drop-in alternative to the closed Pinnacle API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [{ name = "pinnapi", email = "info@pinnapi.com" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"pinnacle", "pinnacle-api", "odds", "odds-api", "betting", "sports-betting",
|
|
15
|
+
"arbitrage", "dropping-odds", "steam-moves", "closing-line-value", "sse",
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.8",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
28
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
29
|
+
]
|
|
30
|
+
dependencies = ["requests>=2.20"]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://pinnapi.com"
|
|
34
|
+
Documentation = "https://pinnapi.com/docs"
|
|
35
|
+
"API reference (LLM-friendly)" = "https://pinnapi.com/llms-full.txt"
|
|
36
|
+
Blog = "https://pinnapi.com/blog"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/pinnapi"]
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.sdist]
|
|
42
|
+
include = ["src/pinnapi", "README.md", "LICENSE", "tests"]
|