V2 WebSocket

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.

get/api/v2/ws/markets

Request

  • Base URL
    https://therundown.io
  • Auth
    API key in header X-TheRundown-Key

Query parameters

affiliate_idsstring

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.

sport_idsstring

Comma-separated sport IDs to filter

event_idsstring

Comma-separated event IDs to filter

market_idsstring

Comma-separated market IDs to filter

Changes

No recorded changes to this operation across all 15 revisions of this API.