Subscribe
Subscribe to a channel to receive real-time updates.Message Structure
Fields
type(required): Must be"subscribe";channel(required): Channel type ("user","market"or"event");auth(required only forchannel: "user"): User’s API key (X-Api-Key);markets(required forchannel: "market"): Array of market IDs;events(required forchannel: "event"): Array of event IDs;filter(optional forchannel: "market"andchannel: "event"): Desired update type""or"all": All updates (default)"orderbook": Only orderbook updates"trades": Only trade updates
Examples
Subscribe to User Channel
Subscribe to Market Channel
Subscribe to Event Channel
Multiple Subscriptions
You can subscribe to multiple channels and multiple resources on the same WebSocket connection:Unsubscribe
Cancel subscription to a channel to stop receiving updates.Message Structure
Fields
type(required): Must be"unsubscribe";channel(required): Channel type ("user","market"or"event");markets(required forchannel: "market"): Array of market IDs to unsubscribe from;events(required forchannel: "event"): Array of event IDs to unsubscribe from.
Examples
Unsubscribe from User Channel
Unsubscribe from Specific Markets
Unsubscribe from Specific Events
Complete Example
Important Notes
- Subscriptions Persist: Once subscribed, you will continue receiving updates until you unsubscribe or disconnect;
- Multiple Subscriptions to Same Resource: You can subscribe to the same market/event multiple times without issues;
- Partial Cancellation: For
marketandeventchannels, you can unsubscribe from specific resources without affecting others; - Reconnection: In case of reconnection, you will need to subscribe again to all desired channels.

