|
| 1 | +# Error codes for Binance (2019-09-25) |
| 2 | +Errors consist of two parts: an error code and a message. Codes are universal, |
| 3 | + but messages can vary. Here is the error JSON payload: |
| 4 | +```javascript |
| 5 | +{ |
| 6 | + "code":-1121, |
| 7 | + "msg":"Invalid symbol." |
| 8 | +} |
| 9 | +``` |
| 10 | + |
| 11 | + |
| 12 | +## 10xx - General Server or Network issues |
| 13 | +#### -1000 UNKNOWN |
| 14 | + * An unknown error occured while processing the request. |
| 15 | + |
| 16 | +#### -1001 DISCONNECTED |
| 17 | + * Internal error; unable to process your request. Please try again. |
| 18 | + |
| 19 | +#### -1002 UNAUTHORIZED |
| 20 | + * You are not authorized to execute this request. |
| 21 | + |
| 22 | +#### -1003 TOO_MANY_REQUESTS |
| 23 | + * Too many requests queued. |
| 24 | + * Too much request weight used; please use the websocket for live updates to avoid polling the API. |
| 25 | + * Too much request weight used; current limit is %s request weight per %s %s. Please use the websocket for live updates to avoid polling the API. |
| 26 | + * Way too much request weight used; IP banned until %s. Please use the websocket for live updates to avoid bans. |
| 27 | + |
| 28 | +#### -1006 UNEXPECTED_RESP |
| 29 | + * An unexpected response was received from the message bus. Execution status unknown. |
| 30 | + |
| 31 | +#### -1007 TIMEOUT |
| 32 | + * Timeout waiting for response from backend server. Send status unknown; execution status unknown. |
| 33 | + |
| 34 | +#### -1014 UNKNOWN_ORDER_COMPOSITION |
| 35 | + * Unsupported order combination. |
| 36 | + |
| 37 | +#### -1015 TOO_MANY_ORDERS |
| 38 | + * Too many new orders. |
| 39 | + * Too many new orders; current limit is %s orders per %s. |
| 40 | + |
| 41 | +#### -1016 SERVICE_SHUTTING_DOWN |
| 42 | + * This service is no longer available. |
| 43 | + |
| 44 | +#### -1020 UNSUPPORTED_OPERATION |
| 45 | + * This operation is not supported. |
| 46 | + |
| 47 | +#### -1021 INVALID_TIMESTAMP |
| 48 | + * Timestamp for this request is outside of the recvWindow. |
| 49 | + * Timestamp for this request was 1000ms ahead of the server's time. |
| 50 | + |
| 51 | +#### -1022 INVALID_SIGNATURE |
| 52 | + * Signature for this request is not valid. |
| 53 | + |
| 54 | + |
| 55 | +## 11xx - Request issues |
| 56 | +#### -1100 ILLEGAL_CHARS |
| 57 | + * Illegal characters found in a parameter. |
| 58 | + * Illegal characters found in parameter '%s'; legal range is '%s'. |
| 59 | + |
| 60 | +#### -1101 TOO_MANY_PARAMETERS |
| 61 | + * Too many parameters sent for this endpoint. |
| 62 | + * Too many parameters; expected '%s' and received '%s'. |
| 63 | + * Duplicate values for a parameter detected. |
| 64 | + |
| 65 | +#### -1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED |
| 66 | + * A mandatory parameter was not sent, was empty/null, or malformed. |
| 67 | + * Mandatory parameter '%s' was not sent, was empty/null, or malformed. |
| 68 | + * Param '%s' or '%s' must be sent, but both were empty/null! |
| 69 | + |
| 70 | +#### -1103 UNKNOWN_PARAM |
| 71 | + * An unknown parameter was sent. |
| 72 | + |
| 73 | +#### -1104 UNREAD_PARAMETERS |
| 74 | + * Not all sent parameters were read. |
| 75 | + * Not all sent parameters were read; read '%s' parameter(s) but was sent '%s'. |
| 76 | + |
| 77 | +#### -1105 PARAM_EMPTY |
| 78 | + * A parameter was empty. |
| 79 | + * Parameter '%s' was empty. |
| 80 | + |
| 81 | +#### -1106 PARAM_NOT_REQUIRED |
| 82 | + * A parameter was sent when not required. |
| 83 | + * Parameter '%s' sent when not required. |
| 84 | + |
| 85 | +#### -1111 BAD_PRECISION |
| 86 | + * Precision is over the maximum defined for this asset. |
| 87 | + |
| 88 | +#### -1112 NO_DEPTH |
| 89 | + * No orders on book for symbol. |
| 90 | + |
| 91 | +#### -1114 TIF_NOT_REQUIRED |
| 92 | + * TimeInForce parameter sent when not required. |
| 93 | + |
| 94 | +#### -1115 INVALID_TIF |
| 95 | + * Invalid timeInForce. |
| 96 | + |
| 97 | +#### -1116 INVALID_ORDER_TYPE |
| 98 | + * Invalid orderType. |
| 99 | + |
| 100 | +#### -1117 INVALID_SIDE |
| 101 | + * Invalid side. |
| 102 | + |
| 103 | +#### -1118 EMPTY_NEW_CL_ORD_ID |
| 104 | + * New client order ID was empty. |
| 105 | + |
| 106 | +#### -1119 EMPTY_ORG_CL_ORD_ID |
| 107 | + * Original client order ID was empty. |
| 108 | + |
| 109 | +#### -1120 BAD_INTERVAL |
| 110 | + * Invalid interval. |
| 111 | + |
| 112 | +#### -1121 BAD_SYMBOL |
| 113 | + * Invalid symbol. |
| 114 | + |
| 115 | +#### -1125 INVALID_LISTEN_KEY |
| 116 | + * This listenKey does not exist. |
| 117 | + |
| 118 | +#### -1127 MORE_THAN_XX_HOURS |
| 119 | + * Lookup interval is too big. |
| 120 | + * More than %s hours between startTime and endTime. |
| 121 | + |
| 122 | +#### -1128 OPTIONAL_PARAMS_BAD_COMBO |
| 123 | + * Combination of optional parameters invalid. |
| 124 | + |
| 125 | +#### -1130 INVALID_PARAMETER |
| 126 | + * Invalid data sent for a parameter. |
| 127 | + * Data sent for paramter '%s' is not valid. |
| 128 | + |
| 129 | +#### -2010 NEW_ORDER_REJECTED |
| 130 | + * NEW_ORDER_REJECTED |
| 131 | + |
| 132 | +#### -2011 CANCEL_REJECTED |
| 133 | + * CANCEL_REJECTED |
| 134 | + |
| 135 | +#### -2013 NO_SUCH_ORDER |
| 136 | + * Order does not exist. |
| 137 | + |
| 138 | +#### -2014 BAD_API_KEY_FMT |
| 139 | + * API-key format invalid. |
| 140 | + |
| 141 | +#### -2015 REJECTED_MBX_KEY |
| 142 | + * Invalid API-key, IP, or permissions for action. |
| 143 | + |
| 144 | +#### -2016 NO_TRADING_WINDOW |
| 145 | + * No trading window could be found for the symbol. Try ticker/24hrs instead. |
| 146 | + |
| 147 | + |
| 148 | +## Messages for -1010 ERROR_MSG_RECEIVED, -2010 NEW_ORDER_REJECTED, and -2011 CANCEL_REJECTED |
| 149 | +This code is sent when an error has been returned by the matching engine. |
| 150 | +The following messages which will indicate the specific error: |
| 151 | + |
| 152 | + |
| 153 | +Error message | Description |
| 154 | +------------ | ------------ |
| 155 | +"Unknown order sent." | The order (by either `orderId`, `clOrdId`, `origClOrdId`) could not be found |
| 156 | +"Duplicate order sent." | The `clOrdId` is already in use |
| 157 | +"Market is closed." | The symbol is not trading |
| 158 | +"Account has insufficient balance for requested action." | Not enough funds to complete the action |
| 159 | +"Market orders are not supported for this symbol." | `MARKET` is not enabled on the symbol |
| 160 | +"Iceberg orders are not supported for this symbol." | `icebergQty` is not enabled on the symbol |
| 161 | +"Stop loss orders are not supported for this symbol." | `STOP_LOSS` is not enabled on the symbol |
| 162 | +"Stop loss limit orders are not supported for this symbol." | `STOP_LOSS_LIMIT` is not enabled on the symbol |
| 163 | +"Take profit orders are not supported for this symbol." | `TAKE_PROFIT` is not enabled on the symbol |
| 164 | +"Take profit limit orders are not supported for this symbol." | `TAKE_PROFIT_LIMIT` is not enabled on the symbol |
| 165 | +"Price * QTY is zero or less." | `price` * `quantity` is too low |
| 166 | +"IcebergQty exceeds QTY." | `icebergQty` must be less than the order quantity |
| 167 | +"This action disabled is on this account." | Contact customer support; some actions have been disabled on the account. |
| 168 | +"Unsupported order combination" | The `orderType`, `timeInForce`, `stopPrice`, and/or `icebergQty` combination isn't allowed. |
| 169 | +"Order would trigger immediately." | The order's stop price is not valid when compared to the last traded price. |
| 170 | +"Cancel order is invalid. Check origClOrdId and orderId." | No `origClOrdId` or `orderId` was sent in. |
| 171 | +"Order would immediately match and take." | `LIMIT_MAKER` order type would immediately match and trade, and not be a pure maker order. |
| 172 | +"The relationship of the prices for the orders is not correct." | The prices set in the `OCO` is breaking the Price rules. <br> The rules are: <br> `SELL Orders`: Limit Price > Last Price > Stop Price <br>`BUY Orders`: Limit Price < Last Price < Stop Price |
| 173 | +"OCO orders are not supported for this symbol" | `OCO` is not enabled on the symbol |
| 174 | +"Quote order qty market orders are not support for this symbol."| `MARKET` orders using the parameter `quoteOrderQty` are not enabled on the symbol. |
| 175 | + |
| 176 | +## -9xxx Filter failures |
| 177 | +Error message | Description |
| 178 | +------------ | ------------ |
| 179 | +"Filter failure: PRICE_FILTER" | `price` is too high, too low, and/or not following the tick size rule for the symbol. |
| 180 | +"Filter failure: PERCENT_PRICE" | `price` is X% too high or X% too low from the average weighted price over the last Y minutes. |
| 181 | +"Filter failure: LOT_SIZE" | `quantity` is too high, too low, and/or not following the step size rule for the symbol. |
| 182 | +"Filter failure: MIN_NOTIONAL" | `price` * `quantity` is too low to be a valid order for the symbol. |
| 183 | +"Filter failure: ICEBERG_PARTS" | `ICEBERG` order would break into too many parts; icebergQty is too small. |
| 184 | +"Filter failure: MARKET_LOT_SIZE" | `MARKET` order's `quantity` is too high, too low, and/or not following the step size rule for the symbol. |
| 185 | +"Filter failure: MAX_POSITION" | The account's position has reached the maximum defined limit. <br> This is composed of the sum of the balance of the base asset, and the sum of the quantity of all open `BUY` orders. |
| 186 | +"Filter failure: MAX_NUM_ORDERS" | Account has too many open orders on the symbol. |
| 187 | +"Filter failure: MAX_ALGO_ORDERS" | Account has too many open stop loss and/or take profit orders on the symbol. |
| 188 | +"Filter failure: MAX_NUM_ICEBERG_ORDERS" | Account has too many open iceberg orders on the symbol. |
| 189 | +"Filter failure: EXCHANGE_MAX_NUM_ORDERS" | Account has too many open orders on the exchange. |
| 190 | +"Filter failure: EXCHANGE_MAX_ALGO_ORDERS" | Account has too many open stop loss and/or take profit orders on the exchange. |
| 191 | + |
0 commit comments