WebSocket

wss://api.pricedodds.com/v1/stream · All-Access, or any plan with the WebSocket add-on. The Pinnacle add-on includes WebSocket for Pinnacle.

1. Connect and authenticate

Send the key in the Authorization header, or (browsers) as the first message:

{"type":"auth","key":"po_live_..."}

You receive {"type":"ready","seq":...,"data":{"plan":"All-Access","books":[...]}}.

2. Subscribe

{"type":"subscribe","leagues":["nba","nfl"],"books":["draftkings","fanduel"],"markets":["moneyline","spread","total"],"include":["best","fair"]}

All fields are optional. You get snapshot frames (part/parts) with the current state, then deltas. The subscription builder writes this message, and the Node client that sends it, from the leagues, books and markets you pick.

Which market types are pushed: the ones with realtime: true in GET /v1/markets (and in GET /v1/coverage). Their ws_periods are the periods on the socket; with delivery: "mixed" the other periods of that market are refreshed by REST. Market types with delivery: "rest" are refreshed by REST at rest_refresh_minutes; they are not in the real-time push set, but once priced they are in the snapshot of your subscription and their changes arrive as price frames when a refresh brings a new price. To follow only the real-time ones, read GET /v1/markets, keep the keys with realtime: true and send them in markets. The current list is on the coverage page.

Two more filters: sports, a list of sport ids, and status. With "status":"live" you get in-play events only; the default is "scheduled,live", and any other value is rejected with invalid_param.

{"type":"subscribe","sports":["tennis"],"status":"live","markets":["moneyline"]}

A mistyped sport, league, market or book in a subscription returns an error frame with the same code, fix and did_you_mean as the REST API, for example unknown_sport with "did_you_mean":["soccer"].

3. Deltas

{
  "type": "price",
  "seq": 1048213,
  "ts": "2026-11-22T18:04:05.330Z",
  "data": {
    "event_id": "evt_3fq9x2m1k8ab7c0d",
    "book": "fanduel",
    "changes": [
      {
        "market_id": "mkt_2k8da2b3c4d5e6f7",
        "market": "spread",
        "period": "game",
        "selection_id": "sel_a1b2c3d4e5f6g7h2",
        "side": "home",
        "line": -4.5,
        "decimal": 1.952,
        "american": -105,
        "prev_american": -108
      }
    ],
    "best": {
      "sel_a1b2c3d4e5f6g7h2": {
        "book": "fanduel",
        "decimal": 1.952,
        "american": -105
      }
    },
    "fair": {
      "sel_a1b2c3d4e5f6g7h2": {
        "american": -100,
        "decimal": 1.996,
        "prob": 0.501
      }
    }
  }
}

Times on a frame: ts is when PricedOdds ingested the upstream frame (ISO-8601). When the upstream source sent a market time, each entry of data.changes[] also carries sourceChangedAt, that upstream time in ISO-8601 (UTC, ending in Z); it is omitted when the source sends none. changedAt and updatedAt on snapshots and REST remain ingest times. With them you can measure both hops yourself: Date.now() - Date.parse(change.sourceChangedAt) and Date.now() - Date.parse(frame.ts). Our own measurement, dated, is on the latency page.

On exchanges and prediction markets each change also carries lay_decimal, lay_american and liquidity (same fields as REST). A change whose american equals prev_american is a liquidity update: the price did not move, the lay price or the stake available did. Liquidity updates are sent when the lay price moves (at once) or the stake moves by at least 10 % ($10 under $100), at most once every 2 seconds per price; REST always shows the latest value.

decimal: null means the book pulled that price. Other frames: event (status/time changed), score (live score and period), error.

4. Entitlement changes

If your plan or books change while you are connected (for example you add the Pinnacle add-on), the server sends:

{"type":"entitlement","seq":1048300,"ts":"2026-11-22T18:10:00.000Z","data":{"plan":"Starter + Pinnacle","books":["draftkings","circa","pinnacle"]}}

Replace the book list you were using with data.books. If you subscribed without an explicit books list, a fresh snapshot of the newly added books follows. Books that left the plan are dropped from an explicit subscription. If the key is suspended the socket closes with code 4002.

5. Resume

Store the highest seq. After a reconnect send {"type":"resume","since_seq":1048213, ...same filters}. You get resume_ok and the missed frames, or resync followed by a fresh snapshot if it is too old.

Run against the API

This client was run on November 24, 2026, 16:07 UTC with Node v24.22.1 for 20 seconds, with a key in PRICEDODDS_API_KEY. Replace it with your own key.

// stream.mjs · Node 22 or later (built-in WebSocket)
// Run: PRICEDODDS_API_KEY=your_key node stream.mjs
const ws = new WebSocket('wss://api.pricedodds.com/v1/stream');
const subscribe = {"type":"subscribe","leagues":["nba"],"books":["draftkings","fanduel"],"markets":["moneyline"],"include":["best","fair"]};
ws.onopen = () => ws.send(JSON.stringify({ type: 'auth', key: process.env.PRICEDODDS_API_KEY }));
ws.onmessage = (m) => {
  console.log(m.data);
  if (JSON.parse(m.data).type === 'ready') ws.send(JSON.stringify(subscribe));
};
ws.onclose = (e) => console.error('closed', e.code);
setTimeout(() => ws.close(), 20000);

It sent this subscription after ready:

{"type":"subscribe","leagues":["nba"],"books":["draftkings","fanduel"],"markets":["moneyline"],"include":["best","fair"]}

The first 3 messages it received, shortened (lists of objects cut to their first item). In 20 seconds it received 1 ready, 5 snapshot in total; price frames only arrive when a price changes. It is example output, not current prices.

Message 1: ready

{
  "type": "ready",
  "seq": 58796871,
  "ts": "2026-11-24T16:07:46.737Z",
  "data": {
    "plan": "All-Access",
    "books": [
      "draftkings",
      "fanduel",
      "betmgm",
      "fanatics",
      "caesars",
      "bet365",
      "hardrock",
      "betrivers",
      "circa",
      "fliff",
      "novig",
      "prophetx",
      "kalshi",
      "polymarket",
      "betonline",
      "pinnacle"
    ],
    "limits": {
      "websocket_connections": 3
    },
    "heartbeat_seconds": 20
  }
}

Message 2: snapshot (part 1 of 5)

{
  "type": "snapshot",
  "seq": 58796890,
  "ts": "2026-11-24T16:07:46.846Z",
  "part": 1,
  "parts": 5,
  "data": [
    {
      "event": {
        "id": "evt_3k24vppqx67j7fdi",
        "sport": "basketball",
        "league": {
          "id": "nba",
          "name": "NBA"
        },
        "home": {
          "id": "tm_y7e6pn5xwo73ug2c",
          "name": "Orlando Magic",
          "abbr": "ORL"
        },
        "away": {
          "id": "tm_53kxhwtig44z33h3",
          "name": "Detroit Pistons",
          "abbr": "DET"
        },
        "startsAt": "2026-11-25T00:00:00.000Z",
        "status": "scheduled",
        "live": null,
        "books": [
          "draftkings",
          "fanduel"
        ],
        "markets_available": 177
      },
      "markets": [
        {
          "id": "mkt_banwqqxmwdhsyneg",
          "market": "moneyline",
          "period": "1h",
          "selections": [
            {
              "id": "sel_gex5e4uq5q3dsnur",
              "side": "home",
              "line": null,
              "prices": [
                {
                  "book": "draftkings",
                  "decimal": 2.1,
                  "american": 110,
                  "implied": 0.4762,
                  "updatedAt": "2026-11-24T16:06:18.835Z",
                  "changedAt": "2026-11-24T12:48:02.611Z",
                  "sourceChangedAt": "2026-11-24T12:48:02.411Z"
                }
              ],
              "best": {
                "book": "draftkings",
                "decimal": 2.1,
                "american": 110
              },
              "fair": {
                "decimal": 2.185,
                "american": 119,
                "prob": 0.4576,
                "method": "market_consensus_v1",
                "sources": [
                  "fanduel",
                  "draftkings"
                ]
              }
            }
          ],
          "margin": {
            "fanduel": 0.0496,
            "draftkings": 0.0415
          }
        }
      ]
    }
  ]
}

Message 3: snapshot (part 2 of 5)

{
  "type": "snapshot",
  "seq": 58796890,
  "ts": "2026-11-24T16:07:46.847Z",
  "part": 2,
  "parts": 5,
  "data": [
    {
      "event": {
        "id": "evt_saagicfuf6dxjhgc",
        "sport": "basketball",
        "league": {
          "id": "nba",
          "name": "NBA"
        },
        "home": {
          "id": "tm_5qn2hytk43rc7tio",
          "name": "Portland Trail Blazers",
          "abbr": "POR"
        },
        "away": {
          "id": "tm_ihyuy6n6ojxxgt35",
          "name": "San Antonio Spurs",
          "abbr": "SAS"
        },
        "startsAt": "2026-11-26T03:00:00.000Z",
        "status": "scheduled",
        "live": null,
        "books": [],
        "markets_available": 0
      },
      "markets": []
    }
  ]
}

Limits

Server pings every 20 s. Connections per plan: Solo/Starter 1, Growth 2, All-Access 3 (1 during the trial). A client that cannot keep up is closed with code 4008 (slow_consumer); reconnect and resume. Close codes: 4001 auth, 4002 billing, 4003 plan, 4029 too many connections.

Read next: one connection for all your books and which books have live prices.