Skip to main content

Overview

The WebSocket API requires authentication for a successful connection. Authentication is done before connection upgrade. In order to connect, you must provide these HTTP headers:
  • X-API-Key: Your Roxom API Key.
  • X-API-Signature: base64-encoded RSA signature. The payload you should hash is GET:/ws, then sign the digest using your private key.
You can find more examples on how to authenticate in the Authentication section.

Error Codes

Common WebSocket connection and operation errors:

Authentication Errors

  • 600010 - Authentication failed (invalid API key or signature)

Subscription Errors

  • 60014 - Invalid channel name (unsupported channel type)
  • 60015 - Invalid symbol (trading pair not available)
  • 60016 - Subscription limit exceeded (too many active subscriptions)

Protocol Errors

  • 60017 - Message parsing error (malformed JSON request)
  • 60018 - Binary messages not supported (use text messages only)
  • 60019 - Internal server error (temporary service issue)

Error Response Format

{
  "event": "error",
  "code": "600010", 
  "msg": "Authentication failed",
  "connId": "01234567-89ab-7def-8123-456789abcdef"
}

Next Steps

After establishing a connection, you can:
I