> For the complete documentation index, see [llms.txt](https://docs.koinbay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinbay.com/api/error-codes-and-enums.md).

# Error codes & enums

Standard error payload: \`{"code": -1121, "msg": "Invalid symbol."}\` (spot).&#x20;

Futures wraps it as \`{"code":"-1121","succ":false,"msgData":null,"msg":"..."}\`.

<table data-search="false"><thead><tr><th>Code</th><th>Name</th><th>Meaning</th></tr></thead><tbody><tr><td>-1000</td><td>UNKNOWN</td><td>Unknown error (often a bad symbol/contract name).</td></tr><tr><td>-1001</td><td>DISCONNECTED</td><td>Internal error; unable to process. Retry.</td></tr><tr><td>-1002</td><td>UNAUTHORIZED</td><td>X-CH-APIKEY missing from headers.</td></tr><tr><td>-1003</td><td>TOO_MANY_REQUESTS</td><td>Requests too frequent; rate limit exceeded.</td></tr><tr><td>-1004</td><td>NO_THIS_COMPANY</td><td>User/company does not exist.</td></tr><tr><td>-1006</td><td>UNEXPECTED_RESP</td><td>Order status UNKNOWN (message-bus issue).</td></tr><tr><td>-1007</td><td>TIMEOUT</td><td>Backend timeout; send/exec status unknown.</td></tr><tr><td>-1014</td><td>UNKNOWN_ORDER_COMPOSITION</td><td>Unsupported order combination.</td></tr><tr><td>-1015</td><td>TOO_MANY_ORDERS</td><td>Order count exceeds the maximum.</td></tr><tr><td>-1016</td><td>SERVICE_SHUTTING_DOWN</td><td>Service no longer available.</td></tr><tr><td>-1017</td><td>NO_CONTENT_TYPE</td><td>Attach Content-Type: application/json.</td></tr><tr><td>-1020</td><td>UNSUPPORTED_OPERATION</td><td>Operation not supported.</td></tr><tr><td>-1021</td><td>INVALID_TIMESTAMP</td><td>Timestamp offset too large vs server time.</td></tr><tr><td>-1022</td><td>INVALID_SIGNATURE</td><td>Signature verification failed.</td></tr><tr><td>-1023</td><td>UNAUTHORIZED</td><td>X-CH-TS missing from headers.</td></tr><tr><td>-1024</td><td>UNAUTHORIZED</td><td>X-CH-SIGN missing from headers.</td></tr><tr><td>-1100</td><td>ILLEGAL_CHARS</td><td>Illegal characters in a parameter.</td></tr><tr><td>-1101</td><td>TOO_MANY_PARAMETERS</td><td>Too many parameters for this endpoint.</td></tr><tr><td>-1102</td><td>MANDATORY_PARAM_EMPTY</td><td>Required param null, missing or malformed.</td></tr><tr><td>-1103</td><td>UNKNOWN_PARAM</td><td>Unknown parameter sent.</td></tr><tr><td>-1104</td><td>UNREAD_PARAMETERS</td><td>Not all sent parameters were read.</td></tr><tr><td>-1105</td><td>(empty)</td><td>A required parameter was empty.</td></tr><tr><td>-1106</td><td>PARAM_NOT_REQUIRED</td><td>A parameter was sent when not required.</td></tr><tr><td>-1111</td><td>BAD_PRECISION</td><td>Precision exceeds the maximum for this asset.</td></tr><tr><td>-1112</td><td>(empty)</td><td>No pending orders / order to cancel does not exist.</td></tr><tr><td>-1116</td><td>INVALID_ORDER_TYPE</td><td>Must be LIMIT or MARKET.</td></tr><tr><td>-1117</td><td>INVALID_SIDE</td><td>Must be BUY or SELL.</td></tr><tr><td>-1121</td><td>BAD_SYMBOL</td><td>Invalid or missing symbol / contract.</td></tr><tr><td>-1136</td><td>ORDER_QUANTITY_TOO_SMALL</td><td>Order volume below the minimum.</td></tr><tr><td>-1138</td><td>ORDER_PRICE_WAVE_EXCEED</td><td>Order price outside permissible range.</td></tr><tr><td>-1139</td><td>ORDER_NOT_SUPPORT_MARKET</td><td>Pair does not support market trading.</td></tr><tr><td>-1145</td><td>(empty)</td><td>Order status does not allow cancellation.</td></tr><tr><td>-1147</td><td>PRICE_VOLUME_PRESION_ERROR</td><td>Price/quantity precision exceeds max.</td></tr><tr><td>-2013</td><td>NO_SUCH_ORDER</td><td>Order does not exist.</td></tr><tr><td>-2015</td><td>REJECTED_CH_KEY</td><td>Invalid key, IP not whitelisted, or no permission.</td></tr><tr><td>-2016</td><td>EXCHANGE_LOCK</td><td>Transactions frozen / exchange lock.</td></tr><tr><td>-2017</td><td>balance_not_enough</td><td>Insufficient balance.</td></tr><tr><td>-2100</td><td>PARAM_ERROR</td><td>Parameter error (futures-only code).</td></tr><tr><td>-2200</td><td>(empty)</td><td>Illegal / untrusted IP.</td></tr><tr><td>35</td><td>(empty)</td><td>Forbidden to order (account may be restricted).</td></tr><tr><td>10015</td><td>(empty)</td><td>Exceeded the close available (close/stop order with no open position).</td></tr></tbody></table>

## Enums

* **Order status (live)**: spot create returns int 0, then GET returns NEW -> PENDING\_CANCEL; futures INIT -> PENDING\_CANCEL. Cancellation is ASYNC (returns PENDING\_CANCEL, not immediate CANCELED).&#x20;
* **Order types**: LIMIT, MARKET.
* **Order sides**: BUY, SELL.
* **Kline intervals**: spot = 1min,5min,15min,30min,60min,1day,1week,1month (1h returns \[]); futures = 1min,5min,15min,30min,1h,1day,1week,1month. 4h is not accepted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.koinbay.com/api/error-codes-and-enums.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
