Skip to main content

Error format

When the server encounters an error processing a message, it sends an error event:
The 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.
Other examples:
  • “Symbols required to subscribe to asset prices”
  • “Room name is required”

Unknown message type

Sent when the type 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

WebSocket upgrades are rate-limited per IP. When the message rate is exceeded, the server sends a rate limit error but keeps the connection open. Slow down your message rate to resume normal operation.

Best practices

  • Always handle error events. Check msg.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, and symbols are present before sending to avoid unnecessary round-trips.