Error format
When the server encounters an error processing a message, it sends an error event:data.message field contains a human-readable description of the error.
Common errors
Invalid message format
Sent when the message is not valid JSON.Missing required fields
Sent when a required field is missing from the message.- “Symbols required to subscribe to asset prices”
- “Room name is required”
Unknown message type
Sent when thetype field does not match any known message type.
Unsupported values
Sent when a field value is not supported.Wrong endpoint
Sent when you try to subscribe to a channel on the wrong endpoint.Rate limit exceeded
Sent when the client sends too many messages.Rate limits
| Limit | Value | Scope |
|---|---|---|
| Message rate | 10 messages/second | Per connection |
Best practices
- Always handle
errorevents. Checkmsg.type === "error"and log the message for debugging. - Don’t retry immediately on errors. If you receive a rate limit error, slow down before sending more messages.
- Use the right endpoint. Each endpoint only accepts specific channels. See the error message for which endpoint to use.
- Validate before sending. Check that required fields like
eventId,marketIds, andsymbolsare present before sending to avoid unnecessary round-trips.