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 isGET:/ws
, then sign the digest using your private key.
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
Next Steps
After establishing a connection, you can:- Subscribe to Market Data streams for real-time quotes and trades
- Enable Account Updates for order and balance notifications