Migrating to ParlayAPI WebSocket

Moving from OddsJam, OpticOdds, SharpAPI, or The Odds API polling to our WebSocket? This guide maps URL paths, auth headers, sport keys, market keys, and behavior so you don't have to read both docs side-by-side.

Reference Quickstart Examples Player props Edge alerts Migration

From The Odds API (polling REST)

TOA doesn't offer push streaming. The migration is "stop polling, open a WebSocket once, react to odds_update frames as they land." Your existing TOA URL pattern maps cleanly:

The Odds APIParlayAPI WebSocket
GET /v4/sports/basketball_nba/odds?apiKey=K (poll every 5–60 s)WSS /v1/ws/odds/basketball_nba?apiKey=K
GET /v4/sports/basketball_nba/events/{id}/oddsSame WSS as above, send {"type":"subscribe","event_id":"..."} after connect
Auth: apiKey query paramAuth: apiKey query param (or X-API-Key header)
Sport keys: basketball_nba, baseball_mlb, ...Same sport keys, byte-identical
Market keys: h2h, spreads, totals, player_pointsSame market keys

Row shape differs slightly: TOA returns nested bookmakers → markets → outcomes, our WebSocket flattens to one row per outcome. See the full TOA migration guide for the field-by-field mapping.

From OddsJam (their WebSocket → ours)

OddsJamParlayAPI
Endpoint: wss://api.oddsjam.com/v2/stream/...wss://parlay-api.com/v1/ws/odds/{sport_key}
Auth: X-API-Key headerSame: X-API-Key header (or query param)
Filter: subscribe channel per marketFilter: single subscribe frame per event, or query-param prefilters (bookmakers=, markets=) on SSE
Sport keys: OddsJam-specific (NBA, MLB)Lower-snake (basketball_nba, baseball_mlb)
Frame envelope: { event_type, data }{ type, data, sport_key, timestamp, count, coalesced }
Pricing: starts at $700/moWebSocket on Business $499/mo, Scale $1,500/mo (no add-on tier needed)

If you have an OddsJam consumer, the structural change is: replace their per-market channel subscribe with our per-event subscribe; map their sport-name strings to our snake-case sport_keys; rename event_typetype.

From OpticOdds

OpticOddsParlayAPI
Endpoint: wss://api.opticodds.com/api/v3/stream/...wss://parlay-api.com/v1/ws/odds/{sport_key}
Auth: query string ?key=KQuery ?apiKey=K or header X-API-Key
Frame: protobuf option, JSON optionJSON only (one object per WS frame)
Sport keys: nfl, nba, mlb (short)Snake-case long (americanfootball_nfl, basketball_nba)
Subscribe: channel-per-game, multi-channelSingle subscribe frame, one event filter per connection
Pricing: $799+/moBusiness $499/mo

From SharpAPI

SharpAPI focuses on polling REST. Their streaming is gated behind an enterprise add-on. Our standard Business / Enterprise / Scale tiers all include WebSocket.

SharpAPIParlayAPI
GET /v1/odds?sport=nbaWSS /v1/ws/odds/basketball_nba
Auth: Authorization: BearerX-API-Key (or ?apiKey=, or Authorization: Bearer for SSE)
Streaming: add-on tier, contact salesIncluded on Business / Enterprise / Scale

Side-by-side row shape

How the same NBA h2h price looks across vendors. Where vendors nest, we flatten — each row is one outcome at one book.

The Odds API

{
  "id": "abc123",
  "sport_key": "basketball_nba",
  "home_team": "Boston Celtics",
  "away_team": "New York Knicks",
  "commence_time": "2026-05-13T23:30:00Z",
  "bookmakers": [{
    "key": "draftkings",
    "title": "DraftKings",
    "last_update": "2026-05-13T23:24:18Z",
    "markets": [{
      "key": "h2h",
      "last_update": "2026-05-13T23:24:18Z",
      "outcomes": [
        { "name": "Boston Celtics", "price": -135 },
        { "name": "New York Knicks", "price": +115 }
      ]
    }]
  }]
}

ParlayAPI WebSocket (per outcome, flat)

{
  "event_id":   "2026-05-13_Boston_Celtics_New_York_Knicks",
  "home_team":  "Boston Celtics",
  "away_team":  "New York Knicks",
  "commence_time": "2026-05-13T23:30:00Z",
  "bookmaker":  "draftkings",
  "market_key": "h2h",
  "outcome":    "Boston Celtics",
  "price_american": -135,
  "price_decimal":   1.741,
  "line":        null,
  "last_update": "2026-05-13T23:24:18Z"
}

To reconstruct TOA's nested shape on your end, group by (event_id, bookmaker, market_key).

Behavior differences to know about

Pricing comparison snapshot

VendorCheapest tier with WS / streamingConcurrent conns at that tier
The Odds APINo WebSocket. REST polling only.
OddsJam$799/moVaries, often 5–10
OpticOdds$799/mo enterprise quoteCustom
SharpAPIAdd-on, $1,000+/moCustom
ParlayAPI Business$499/mo100
ParlayAPI Scale$1,500/mo (raw stream, no coalesce)1000

Numbers above are as of 2026-05-13 from each vendor's published pricing pages. Verify with each vendor for current.

Help porting

If you have a working consumer against another vendor and want help porting, paste a redacted snippet at /support and we'll send back the equivalent for our protocol. Most ports are 30–60 lines of changes.