Skip to main content

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

Step 1: Server-Side Polling Engine

Step 2: WebSocket Server

Use ws 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: The key optimization: only poll events that have at least one connected viewer. When no one is watching an event, stop polling it entirely. This can reduce API usage by 80% during off-peak hours.

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 maxPayload on WebSocket server to prevent memory issues

Get Your Free API Key

Start building in 5 minutes — 10,000 free requests/month

See Pricing

All plans compared side by side