Troubleshooting
Authentication
- Ensure your system clock is synchronized before requesting JWTs or signing API requests.
- Verify that
timestamp_msis close to the current time. - Use a unique
noncefor every authorization request. - Refresh the JWT if authentication fails due to token expiration.
WebSocket
- Automatically reconnect if the connection is interrupted.
- Re-authenticate after reconnecting to the private WebSocket.
- Re-subscribe to all required topics after reconnecting.
- Respond to WebSocket ping frames and optionally send application-level
pingmessages to monitor latency.
REST
- Retry transient failures using exponential backoff.
- Respect HTTP
429 Too Many Requestsresponses and theRetry-Afterheader. - Avoid excessive polling for frequently changing market data.
Best Practices
- Use WebSocket streams for real-time market data instead of frequent REST polling.
- Keep a REST fallback for critical state synchronization and recovery.
- Validate order parameters using the instrument metadata returned by
/api/v1/market/instruments-info. - Treat all prices and quantities as decimal strings to avoid precision loss.
- Handle order status updates through the private
orderWebSocket topic rather than relying solely on REST responses.