All communication uses JSON messages over a single WebSocket connection. The protocol supports three operations: subscribe, unsubscribe, and ping.
Start receiving data from a channel:
Request
{"method": "subscribe", "subscription": {"type": "order_statuses"}}{"method": "subscribe", "subscription": {"type": "order_statuses"}}{"method": "subscribe", "subscription": {"type": "order_statuses"}}Response
{"type": "subscription_ack", "subscription": {"type": "order_statuses"}}{"type": "subscription_ack", "subscription": {"type": "order_statuses"}}{"type": "subscription_ack", "subscription": {"type": "order_statuses"}}Stop receiving data from a channel:
Request
{"method": "unsubscribe", "subscription": {"type": "order_statuses"}}{"method": "unsubscribe", "subscription": {"type": "order_statuses"}}{"method": "unsubscribe", "subscription": {"type": "order_statuses"}}Response
{"type": "unsubscription_ack", "subscription": {"type": "order_statuses"}}{"type": "unsubscription_ack", "subscription": {"type": "order_statuses"}}{"type": "unsubscription_ack", "subscription": {"type": "order_statuses"}}If you send an invalid channel name or malformed JSON, the server will respond with an error message. Always validate your subscription type against the available channels list.
Subscribing to the same channel twice is a no-op — the server will acknowledge it but you won't receive duplicate messages.