Markets WebSocket: stream real-time market price updates
Establishes a WebSocket connection for streaming V2 market price changes in real-time.
Connection: wss://therundown.io/api/v2/ws/markets
Authenticate the WebSocket upgrade with X-TheRundown-Key: $THERUNDOWN_API_KEY from a server-side client. Native browser WebSocket clients cannot set custom headers; use an authenticated backend relay for browser consumers. WebSocket access requires an Ultra plan or higher.
Filter parameters (query string):
- affiliate_ids: comma-separated affiliate IDs
- sport_ids: comma-separated sport IDs
- event_ids: comma-separated event IDs
- market_ids: comma-separated market IDs
All filters are optional. If none are specified, all messages are received.
Heartbeat: Server sends {"meta":{"type":"heartbeat"},"data":{"now":"<RFC3339>"}} every 15 seconds.
Message format:
{
"meta": {...},
"data": {
"affiliate_id": 19,
"sport_id": 4,
"event_id": "abc123",
"market_id": 1,
...
}
}
Queue: 1024-message buffer per client. If the client falls behind, messages are dropped.
Request
- Base URLhttps://therundown.io
- AuthAPI key in header X-TheRundown-Key
Query parameters
Comma-separated sportsbook/affiliate IDs to filter. Common values include DraftKings (19), FanDuel (23), BetMGM (22), BookMaker (7), BetCRIS (9), Pinnacle (3), Polymarket US (31), Circa Sports (32), Bet105 (33), and Heritage Sports (34). Availability varies by sport and market. On V2 event endpoints (/api/v2/sports/{sportID}/events/{date}, /api/v2/events/{eventID}, and their openers/closing siblings), affiliate_ids=0 is a scores-only sentinel: the response keeps events, scores, and status and omits markets and price objects. Other endpoints that share this parameter treat affiliate_ids as a sportsbook filter only.
Comma-separated sport IDs to filter
Comma-separated event IDs to filter
Comma-separated market IDs to filter
Changes
No recorded changes to this operation across all 15 revisions of this API.