REST
Every error has the same body. Switch oncode; message is for people and may change.
{ "code": "MARKET_NOT_FOUND", "message": "no market sol-15m-261006-1630-1645" }
| HTTP | code | Meaning |
|---|---|---|
| 400 | BAD_REQUEST | A parameter is missing or invalid; message says which. |
| 400 | INSUFFICIENT_BALANCE | Not enough buying power for a buy, or not enough contracts for a sell. |
| 400 | LIMIT_EXCEEDED | Over a key, account or market limit; message says which. |
| 400 | MARKET_NOT_OPEN | The market isn’t on the order book, isn’t trading yet, or has closed. |
| 400 | POST_ONLY_CROSS | A post_only order would have traded at once. |
| 400 | SELF_TRADE | Would trade against your own resting order. |
| 400 | ORDER_REJECTED | Refused for another reason; message says why. |
| 401 | UNAUTHORIZED | No API key, or one that isn’t valid. See Authentication. |
| 403 | BOOST_UNAVAILABLE | Boost isn’t offered to this account on this market, or the key is a test key. See Boost orders. |
| 403 | FORBIDDEN | The key lacks the permission, or the account can’t trade yet (Terms, allow trading). |
| 404 | ORDER_NOT_FOUND | No order with that id on your account. |
| 404 | MARKET_NOT_FOUND | No market with that ticker on the book. |
| 404 | SERIES_NOT_FOUND | No series with that ticker. |
| 404 | NOT_FOUND | No such route. |
| 405 | METHOD_NOT_ALLOWED | The market-data endpoints take GET only. |
| 409 | IDEMPOTENCY_CONFLICT | That client_order_id was used for a different order. |
| 409 | ACCOUNT_BUSY | Another request on your account is still running. Retry in a moment. |
| 429 | RATE_LIMITED | Too many requests. Wait Retry-After seconds. See Rate limits. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. |
| 503 | TRADING_PAUSED | Trading is paused platform-wide; message says until when. Cancels still work. |
| 503 | EXCHANGE_UNAVAILABLE | The book could not be read, or an order couldn’t be confirmed. Retry — an order with the same client_order_id. |
Websocket error replies
A command that fails gets anerror reply with a numbered code. The numbers never change meaning.
{ "id": 3, "type": "error", "msg": { "code": 1, "msg": "unknown command bogus" } }
| Code | Name | Meaning |
|---|---|---|
| 1 | UNKNOWN_COMMAND | cmd isn’t one of the four commands. |
| 2 | INVALID_PARAMS | Bad JSON or bad parameters; msg says what. |
| 3 | UNKNOWN_CHANNEL | No such channel. |
| 4 | UNKNOWN_SID | No subscription with that sid on this connection. |
| 5 | MARKET_NOT_FOUND | No such market. |
| 6 | SERIES_NOT_FOUND | No such series. |
| 7 | TOO_MANY_SUBSCRIPTIONS | Over 100 subscriptions on this connection. |
| 8 | AUTH_REQUIRED | A private channel. |
| 9 | RATE_LIMITED | Commands sent too fast. |
| 10 | INTERNAL | Something went wrong on our side. |
| 11 | MESSAGE_TOO_LARGE | A message over 64 KB. The connection then closes. |
Websocket close codes
| Code | Meaning |
|---|---|
1001 | The server is restarting. Reconnect and resubscribe. |
1008 | Too many commands queued. Slow down, then reconnect. |
1009 | A message over 64 KB. |