Polling intervals
Odds update every 5–30 seconds depending on the bookmaker and sport. There’s no benefit to polling faster than your use case requires — you’ll burn rate limit quota and get the same data.
Use the WebSocket for live in-play events — it’s push-based and eliminates unnecessary requests entirely.
Filter server-side, not client-side
Always pass filters as query parameters rather than fetching everything and filtering locally. The difference in response size is significant:EPL, NBA) over sport names (Football, Basketball) when you know the league — they’re more precise. One sport can have 60+ competition codes, so filtering by sport can still return hundreds of events.
Use slugs, not match names
Match names can contain accented characters and spaces. Always use the URL-encodedslug field from GET /api/events:
Per-event drilldown pattern
For automated value detection when you need full market depth:Understanding EV%
ev_pct in /api/value-bets measures your expected edge over fair value. In plain English:
A +5% EV bet means that if you placed this bet 1,000 times in identical conditions, you’d expect to profit around 100 wagered — long run.The math:
Understanding payout_rate (TRJ)
payout_rate is Pinnacle’s Total Return on Juice — the sum of implied probabilities across all outcomes:
payout_rate between 1.00 and 1.03:
1.018→ 1.8% margin — normal for football moneylines1.005→ 0.5% margin — very sharp (high-liquidity game)> 1.05→ margin >5% — unreliable reference, filtered out by/api/value-bets
Data freshness
scraped_atfields are UTC ISO-8601 timestamps/api/value-betsreturns only bets detected in the last 30 minutes with odds scraped in the last 15 minutes/api/oddsuses a 10-minute default freshness window (stale_minutes=10)
- Python
- JavaScript
Error handling and retries
Handle the three common failure modes:Monitor rate limits
CheckX-RateLimit-Remaining on every response to avoid hard 429 errors:
Never expose your key
- Make all API calls from your server, never from browser JavaScript
- Never commit keys to git — add
.envto.gitignore - Rotate immediately if a key is accidentally exposed
- Use environment variables in all environments (local, staging, production)