Build a Real-Time Odds Dashboard with Live Updates
Display live odds that update automatically without page refreshes. This guide builds a server-side polling layer that fetches odds from the FieldFunded API and pushes changes to connected browsers via WebSocket — giving your users a real-time experience.Architecture
Your server polls FieldFunded at a controlled rate, diffs the odds against a local cache, and broadcasts only the changes to connected clients. This approach is more efficient than having every browser poll the API directly.What You’ll Use
| SDK Method | Endpoint | Purpose |
|---|---|---|
getEventOdds() | GET /v1/events/{id}/odds | Get current odds for an event |
getLive() | GET /v1/live | List in-play events |
getScores() | GET /v1/scores | Live scores |
Step 1: Server-Side Polling Engine
Step 2: WebSocket Server
Usews or Socket.IO to broadcast changes:
Step 3: Frontend Client
Step 4: Visual Odds Flashing
Make odds changes visible with a brief flash animation:Rate Limit Math
The server polls FieldFunded, not the browsers. Request volume depends on how many events you track:| Events tracked | Poll interval | Requests/day | Monthly | Plan |
|---|---|---|---|---|
| 5 events | 15s | 28,800 | 864,000 | Pro ($79) |
| 5 events | 30s | 14,400 | 432,000 | Pro ($79) |
| 10 events | 30s | 28,800 | 864,000 | Ultra ($149) |
| 3 events | 60s | 4,320 | 129,600 | Starter ($29) |
Production Checklist
- Only poll events with active subscribers
- Implement exponential backoff on API errors
- Add heartbeat pings to detect stale WebSocket connections
- Log all odds changes for analytics
- Set
maxPayloadon WebSocket server to prevent memory issues
Related Guides
- Build a Line Tracker — track odds movements over time
- Build a Betting Platform — full-stack architecture
- Build a Mobile Odds App — native mobile implementation
- FieldFunded vs The Odds API — feature comparison
Get Your Free API Key
Start building in 5 minutes — 10,000 free requests/month
See Pricing
All plans compared side by side
