Skip to main content
You choose the encoding of channel messages with receiveType at login.
Production accepts zstd only. A login with another receiveType is refused with 4001. The odds feed is several megabits per second for a client that follows many fixtures, and zstd makes it about four times smaller.
  • Control frames. login_ok, subscribed, snapshot_required, error and the other control frames are always JSON text frames, whatever the receiveType. Tell them apart by the frame type: text is a control frame, binary is a channel message.
  • One frame, one message. Each binary frame holds exactly one message, compressed on its own. There is no dictionary and no state between frames.

Decode in Python

With websockets and zstandard:
For binary, decode with msgpack instead: message = msgpack.unpackb(frame).

Decode in Node.js

Node.js 22.15 or later decompresses zstd natively. With ws:
For binary, decode with msgpackr instead: const message = unpack(data).