Skip to main content
Every channel on the UpsideMAX WebSocket follows the same subscribe/unsubscribe protocol. You send a JSON message with a method field set to "subscribe" or "unsubscribe", and a subscription object that specifies the channel type and any required parameters. The server acknowledges each request and begins (or stops) pushing messages on that channel.

Subscribing to a channel

Send the following JSON frame to start receiving messages on a channel:
The server responds with a subscriptionResponse acknowledgement:
The data field mirrors your original request so you can match acknowledgements to subscriptions in async code.

Unsubscribing from a channel

Send the same subscription object with "method": "unsubscribe" to stop receiving messages:
The server sends a matching subscriptionResponse with "method": "unsubscribe" to confirm.
The older {"msg": "Subscribe", "channels": [...]} array format is no longer accepted. All clients must use the method + subscription object format shown above.

Error messages

If a subscription request is invalid, the server responds on the error channel:
data.subscription echoes the subscription object of the refused request, mirroring the subscriptionResponse acknowledgement, so you can tell which of several concurrent subscriptions was refused.

All subscription types and parameters

The table below lists every channel type and its parameters. No channel requires an authentication step. Parameter formats:
  • asset — the contract ID as a string, for example "1". Read contract IDs from configs.
  • user — the account address in lowercase, 0x followed by 40 hex characters. The address must belong to a registered account; otherwise the server returns an error frame.
  • group — optional for l2Book: a price-grouping level from the contract’s digitMerge list in configs. See L2 Book.
You can hold multiple active subscriptions on a single WebSocket connection. There is no hard limit on the number of simultaneous subscriptions, but subscribing to many high-frequency channels (e.g., l2Book for many assets) on one connection may increase message processing latency on the client side.

Quick examples by channel type