Bootstrap a Pinnacle odds Python client with /v1/account and /v1/sports
Answer: Before any odds loop, call GET /v1/account and GET /v1/sports with x-api-key. That confirms the key works, shows plan limits (requests/day, WebSocket quota, sports) and gives you the sport ids/slugs the rest of the OpenAPI expects.
Minimal bootstrap#
import os, requests
KEY = os.environ["PINNFEED_KEY"]
H = {"x-api-key": KEY}
BASE = "https://pinnfeed.io"
acct = requests.get(f"{BASE}/v1/account", headers=H, timeout=15)
acct.raise_for_status()
print("plan:", acct.json())
sports = requests.get(f"{BASE}/v1/sports", headers=H, timeout=15)
sports.raise_for_status()
for s in sports.json().get("sports", []):
print(s["id"], s.get("slug"), s.get("name"))
On Free, only the two sports you picked in the dashboard return odds; other slugs may 403 or return empty. Hobby unlocks real-time REST; Builder (€99/mo) adds the WebSocket. Paid plans: 3-day trial; a card is required and it is charged after day 3 unless you cancel.
Next: Python REST odds or pagination. Reference: OpenAPI, REST docs. Educational content for adults (18+).
Questions people ask#
What does /v1/account return?#
Plan name, request quota, remaining calls, whether WebSocket is enabled, and sport limits. Exact fields are in /openapi.json under /v1/account.
Can I skip /v1/sports?#
You can hard-code slugs like soccer and tennis, but listing sports first avoids typos and shows which sports your Free key actually covers today.