Appearance
Errors
REST errors contain an integer code and string message:
json
{
"code": 404,
"message": "market not found"
}| Code | Meaning |
|---|---|
400 | Invalid parameters or malformed channel |
404 | Resource not found |
409 | WebSocket channel already subscribed |
429 | Rate limit exceeded |
500 | Request failed |
503 | WebSocket channel cannot guarantee continuity |
Messages are stable and do not expose internal service errors.
WebSocket errors
WebSocket errors use the same numeric code and string message:
json
{
"type": "error",
"channel": "orderbook/perp/1",
"code": 503,
"message": "stream unavailable",
"timestamp_ns": "1785441661123456789"
}A 503 error closes the server-side channel. Discard its local state and subscribe again. After an unexpected connection close, reconnect and restore subscriptions. Correct 400, 404, or 409 errors before retrying.