Skip to main content
This page documents every message you can send to the SportriX WebSocket stream and every frame the server can send back. For connection setup and a quick-start example, see the WebSocket overview.

Client → Server messages

Send JSON objects to subscribe or unsubscribe from a match. The match_id is the integer id returned by the REST /matches endpoints. Subscribe:
Unsubscribe:

Control message fields

Server → Client frames

Every frame the server sends is a JSON object with an op field that identifies the frame type. The data object is a complete live snapshot, and always includes a match_id field. This lets a single connection multiplex updates from many matches — inspect data.match_id to route each frame to the right handler.

Example frames

v1 sends a full snapshot on every update frame — there are no field-level deltas. Your handler can replace its local state entirely on each frame.
Subscribing to a match outside your enabled sport allowlist returns an error frame. The error message will indicate that the sport is not enabled for your API key.