Subscribe
WSSwss://api.bestbook.app/v1/stream
json
{ "op": "subscribe", "id": "nba", "league": "nba" }
{ "op": "subscribe", "id": "game", "event": "nba:2026-12-01-LAC-PHX", "types": ["spread", "total"], "books": ["dk", "fd"] }
{ "op": "unsubscribe", "id": "nba" }
{ "op": "ping" }
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
op | string | Yes | subscribe, unsubscribe or ping. |
id | string | Yes | Your id for the subscription, up to 64 characters. Reusing it replaces the subscription. |
league | string | No | One league. |
event | string | No | One event. Not with league. Omit both for the whole board. |
types | array | No | Market types. Default all. |
books | array | No | Books. Default all. Lines no listed book prices are left out. |
Up to 50 subscriptions per socket. Unknown fields and values are refused with an error.
Responses
| Sent | Received |
|---|---|
subscribe | [snapshot](snapshot), then [update](update)s |
unsubscribe | {"type":"unsubscribed","sub":"nba"} |
ping | {"type":"pong"} |