Trading error code explainer: MT5, Binance, Bybit and OKX
Paste the error your EA or bot got. You get what it means in plain words, the likely causes (most common first), how to fix it, and the official source with the date we read it. If a code is not in the platform's official list, we say so: we never guess. Free, and it runs in your browser, so nothing you paste is sent to us.
What it covers
2,368 official error codes and messages: MetaTrader 5 trade server return codes (MqlTradeResult.retcode) and MQL5 runtime errors (GetLastError), Binance spot and USDS-M futures error codes with filter failures and -2010 messages, Bybit v5 retCodes and OKX v5 codes and sCodes. 276 of them have a detailed write-up with ranked causes and fix steps; the rest show the official meaning with general fix steps. Where a code example helps, it is short and tested: the MQL5 ones compile in MetaEditor with 0 errors, the Python ones run.
MetaTrader 5 / MQL5: 56 codes explained in detail (of 296 official codes searchable above)
| Code | Name | Meaning |
|---|---|---|
| 10004 | TRADE_RETCODE_REQUOTE | Requote: the broker offers a new price because the price moved before your market order was filled. |
| 10006 | TRADE_RETCODE_REJECT | The trade server rejected the request. |
| 10007 | TRADE_RETCODE_CANCEL | The request was cancelled by the trader (not an error from your code logic). |
| 10008 | TRADE_RETCODE_PLACED | Success: the pending order was placed. |
| 10009 | TRADE_RETCODE_DONE | Success: the request was completed (the deal or change was done). |
| 10010 | TRADE_RETCODE_DONE_PARTIAL | Only part of the request was done (partial fill). |
| 10011 | TRADE_RETCODE_ERROR | Request processing error on the server side. |
| 10012 | TRADE_RETCODE_TIMEOUT | The request timed out; its final result is not known yet. |
| 10013 | TRADE_RETCODE_INVALID | Invalid request: one or more fields of MqlTradeRequest are wrong or missing. |
| 10014 | TRADE_RETCODE_INVALID_VOLUME | Invalid volume: the lot size is below the minimum, above the maximum, or not a multiple of the volume step. Step-by-step fix |
| 10015 | TRADE_RETCODE_INVALID_PRICE | Invalid price in the request. |
| 10016 | TRADE_RETCODE_INVALID_STOPS | Invalid stops: the stop loss or take profit is too close to the price, on the wrong side, or not normalized. Step-by-step fix |
| 10017 | TRADE_RETCODE_TRADE_DISABLED | Trading is disabled for this symbol or account. |
| 10018 | TRADE_RETCODE_MARKET_CLOSED | The market is closed for this symbol right now. |
| 10019 | TRADE_RETCODE_NO_MONEY | Not enough money (free margin) to open this trade. |
| 10020 | TRADE_RETCODE_PRICE_CHANGED | Prices changed while the request was processed. |
| 10021 | TRADE_RETCODE_PRICE_OFF | No quotes to process the request (off quotes). |
| 10022 | TRADE_RETCODE_INVALID_EXPIRATION | Invalid order expiration date in the request. |
| 10023 | TRADE_RETCODE_ORDER_CHANGED | The order state changed while your request was processed. |
| 10024 | TRADE_RETCODE_TOO_MANY_REQUESTS | Too frequent requests: you are sending trade requests too fast. |
| 10025 | TRADE_RETCODE_NO_CHANGES | No changes in the request: the modification has the same values as now. |
| 10026 | TRADE_RETCODE_SERVER_DISABLES_AT | Autotrading is disabled by the server for this account. |
| 10027 | TRADE_RETCODE_CLIENT_DISABLES_AT | Autotrading is disabled in your terminal (the Algo Trading button is off). |
| 10028 | TRADE_RETCODE_LOCKED | The request is locked for processing (another request is being handled). |
| 10029 | TRADE_RETCODE_FROZEN | The order or position is frozen and cannot be changed right now. |
| 10030 | TRADE_RETCODE_INVALID_FILL | Invalid (unsupported) order filling type for this symbol. Step-by-step fix |
| 10031 | TRADE_RETCODE_CONNECTION | No connection with the trade server. |
| 10032 | TRADE_RETCODE_ONLY_REAL | This operation is allowed only for live (real) accounts. |
| 10033 | TRADE_RETCODE_LIMIT_ORDERS | The limit on the number of pending orders has been reached. |
| 10034 | TRADE_RETCODE_LIMIT_VOLUME | The volume limit for this symbol has been reached (orders + positions). |
| 10035 | TRADE_RETCODE_INVALID_ORDER | Incorrect or prohibited order type. |
| 10036 | TRADE_RETCODE_POSITION_CLOSED | The position with this ticket is already closed. |
| 10038 | TRADE_RETCODE_INVALID_CLOSE_VOLUME | The close volume is larger than the current position volume. |
| 10039 | TRADE_RETCODE_CLOSE_ORDER_EXIST | A close order already exists for this position. |
| 10040 | TRADE_RETCODE_LIMIT_POSITIONS | The number of open positions reached the account limit. |
| 10041 | TRADE_RETCODE_REJECT_CANCEL | The pending order activation request was rejected and the order was cancelled. |
| 10042 | TRADE_RETCODE_LONG_ONLY | Only long (buy) positions are allowed for this symbol. |
| 10043 | TRADE_RETCODE_SHORT_ONLY | Only short (sell) positions are allowed for this symbol. |
| 10044 | TRADE_RETCODE_CLOSE_ONLY | Only closing existing positions is allowed for this symbol. |
| 10045 | TRADE_RETCODE_FIFO_CLOSE | Positions must be closed in FIFO order on this account (oldest first). |
| 10046 | TRADE_RETCODE_HEDGE_PROHIBITED | Opposite positions on one symbol are not allowed on this account (no hedging). |
| 4001 | ERR_INTERNAL_ERROR | Unexpected internal error in the terminal. |
| 4003 | ERR_INVALID_PARAMETER | Wrong parameter when calling a system function. |
| 4014 | ERR_FUNCTION_NOT_ALLOWED | The function is not allowed to be called here. |
| 4024 | ERR_INVALID_HANDLE | Invalid handle. |
| 4301 | ERR_MARKET_UNKNOWN_SYMBOL | Unknown symbol: the symbol name does not exist on this broker. |
| 4302 | ERR_MARKET_NOT_SELECTED | The symbol is not selected in Market Watch. |
| 4752 | ERR_TRADE_DISABLED | Trading by Expert Advisors is prohibited (algo trading is off for this EA or terminal). |
| 4753 | ERR_TRADE_POSITION_NOT_FOUND | Position not found. |
| 4754 | ERR_TRADE_ORDER_NOT_FOUND | Order not found. |
| 4755 | ERR_TRADE_DEAL_NOT_FOUND | Deal not found. |
| 4756 | ERR_TRADE_SEND_FAILED | Trade request sending failed (OrderSend returned false). The real reason is in MqlTradeResult.retcode. |
| 4758 | ERR_TRADE_CALC_FAILED | Failed to calculate profit or margin. |
| 4802 | ERR_INDICATOR_CANNOT_CREATE | The indicator cannot be created. |
| 4806 | ERR_INDICATOR_DATA_NOT_FOUND | Requested indicator data not found (often: data not ready yet). |
| 4807 | ERR_INDICATOR_WRONG_HANDLE | Wrong indicator handle. |
Binance (spot + USDS-M futures): 87 codes explained in detail (of 312 official codes searchable above)
| Code | Name | Meaning |
|---|---|---|
| -1000 | UNKNOWN | Unknown error on Binance's side while processing the request. |
| -1001 | DISCONNECTED | Internal error: Binance could not process the request (disconnected). |
| -1002 | UNAUTHORIZED | Not authorized for this request. |
| -1003 | TOO_MANY_REQUESTS | Too many requests: you used more request weight than allowed (repeated abuse leads to an IP ban, HTTP 418). |
| -1006 | UNEXPECTED_RESP | Unexpected response from the message bus: the order's status is unknown. |
| -1007 | TIMEOUT | Timeout waiting for the backend: the order may or may not have been executed. |
| -1008 | SERVER_BUSY | Server busy / request throttled: Binance is overloaded and is refusing requests for now. |
| -1013 | INVALID_MESSAGE | Invalid message: the order was rejected before matching, usually because it failed a symbol filter (price, quantity or notional). |
| -1014 | UNKNOWN_ORDER_COMPOSITION | Unsupported order combination. |
| -1015 | TOO_MANY_ORDERS | Too many new orders in the current time window. |
| -1016 | SERVICE_SHUTTING_DOWN | This service is no longer available. |
| -1020 | UNSUPPORTED_OPERATION | This operation is not supported. |
| -1021 | INVALID_TIMESTAMP | Timestamp outside recvWindow: your computer's clock and Binance's server time differ too much. |
| -1022 | INVALID_SIGNATURE | Invalid signature: the HMAC/RSA/Ed25519 signature does not match the request. |
| -1100 | ILLEGAL_CHARS | Illegal characters in a parameter. |
| -1101 | TOO_MANY_PARAMETERS | Too many parameters, or a duplicate parameter, were sent. |
| -1102 | MANDATORY_PARAM_EMPTY_OR_MALFORMED | A mandatory parameter was not sent, was empty, or was malformed. |
| -1103 | UNKNOWN_PARAM | An unknown parameter was sent. |
| -1104 | UNREAD_PARAMETERS | Not all sent parameters were read. |
| -1105 | PARAM_EMPTY | A parameter was empty. |
| -1106 | PARAM_NOT_REQUIRED | A parameter was sent when not required. |
| -1111 | BAD_PRECISION | Bad precision: price or quantity has more decimals than the symbol allows. Step-by-step fix |
| -1112 | NO_DEPTH | No orders on the book for this symbol. |
| -1114 | TIF_NOT_REQUIRED | timeInForce was sent when not required. |
| -1115 | INVALID_TIF | Invalid timeInForce. |
| -1116 | INVALID_ORDER_TYPE | Invalid order type. |
| -1117 | INVALID_SIDE | Invalid side. |
| -1121 | BAD_SYMBOL | Invalid symbol: the symbol does not exist on this market. |
| -1122 | INVALID_SYMBOLSTATUS | Invalid symbol status (the symbol is not trading now). |
| -1125 | INVALID_LISTEN_KEY | The listenKey does not exist (user data stream expired). |
| -1127 | MORE_THAN_XX_HOURS | Lookup interval is too big. |
| -1128 | OPTIONAL_PARAMS_BAD_COMBO | Combination of optional parameters is invalid. |
| -1130 | INVALID_PARAMETER | Invalid data sent for a parameter. |
| -2010 | NEW_ORDER_REJECTED | New order rejected by the matching engine; the 'msg' says why (most often insufficient balance). |
| -2011 | CANCEL_REJECTED | Cancel rejected (often: the order is already filled, cancelled or unknown). |
| -2013 | NO_SUCH_ORDER | Order does not exist. |
| -2014 | BAD_API_KEY_FMT | API key format invalid. |
| -2015 | REJECTED_MBX_KEY | Invalid API key, IP, or permissions for this action. |
| PRICE_FILTER | Filter failure: PRICE_FILTER | Filter failure PRICE_FILTER: price is too high, too low, or not a multiple of tickSize. Step-by-step fix |
| PERCENT_PRICE | Filter failure: PERCENT_PRICE | Filter failure PERCENT_PRICE: price is too far from the recent average price. |
| PERCENT_PRICE_BY_SIDE | Filter failure: PERCENT_PRICE_BY_SIDE | Filter failure PERCENT_PRICE_BY_SIDE: price is too far from the average price for this side. |
| LOT_SIZE | Filter failure: LOT_SIZE | Filter failure LOT_SIZE: quantity is below minQty, above maxQty, or not a multiple of stepSize. Step-by-step fix |
| MIN_NOTIONAL | Filter failure: MIN_NOTIONAL | Filter failure MIN_NOTIONAL: price x quantity is below the symbol's minimum order value. Step-by-step fix |
| NOTIONAL | Filter failure: NOTIONAL | Filter failure NOTIONAL: price x quantity is outside the symbol's minNotional..maxNotional range. Step-by-step fix |
| ICEBERG_PARTS | Filter failure: ICEBERG_PARTS | Filter failure ICEBERG_PARTS: the iceberg order would split into too many parts. |
| MARKET_LOT_SIZE | Filter failure: MARKET_LOT_SIZE | Filter failure MARKET_LOT_SIZE: market order quantity is too high, too low, or off the step. |
| MAX_POSITION | Filter failure: MAX_POSITION | Filter failure MAX_POSITION: the account position on this symbol would exceed the limit. |
| MAX_NUM_ORDERS | Filter failure: MAX_NUM_ORDERS | Filter failure MAX_NUM_ORDERS: too many open orders on this symbol. |
| MAX_NUM_ALGO_ORDERS | Filter failure: MAX_NUM_ALGO_ORDERS | Filter failure MAX_NUM_ALGO_ORDERS: too many open stop-loss / take-profit orders on the symbol. |
| TRAILING_DELTA | Filter failure: TRAILING_DELTA | Filter failure TRAILING_DELTA: trailingDelta is outside the allowed range. |
| EXCHANGE_MAX_NUM_ORDERS | Filter failure: EXCHANGE_MAX_NUM_ORDERS | Filter failure EXCHANGE_MAX_NUM_ORDERS: too many open orders on the account across the exchange. |
| EXCHANGE_MAX_NUM_ALGO_ORDERS | Filter failure: EXCHANGE_MAX_NUM_ALGO_ORDERS | Filter failure EXCHANGE_MAX_NUM_ALGO_ORDERS: too many open stop/take-profit orders on the account. |
| -1099 (futures) | NOT_FOUND | Not found, unauthenticated, or unauthorized. |
| -2018 (futures) | BALANCE_NOT_SUFFICIENT | Balance is insufficient (futures). |
| -2019 (futures) | MARGIN_NOT_SUFFICIEN | Margin is insufficient (futures): not enough available margin for this order at your leverage. |
| -2020 (futures) | UNABLE_TO_FILL | Unable to fill (futures): the order could not be filled as requested. |
| -2024 (futures) | POSITION_NOT_SUFFICIENT | Position is not sufficient (futures). |
| -2025 (futures) | MAX_OPEN_ORDER_EXCEEDED | Maximum number of open orders reached (futures). |
| -2027 (futures) | MAX_LEVERAGE_RATIO | Exceeded the maximum allowable position at the current leverage (futures). |
| -2028 (futures) | MIN_LEVERAGE_RATIO | Leverage is smaller than permitted: insufficient margin balance (futures). |
| -4003 (futures) | QTY_LESS_THAN_ZERO | Quantity less than or equal to zero (futures). |
| -4004 (futures) | QTY_LESS_THAN_MIN_QTY | Quantity less than the minimum quantity (futures). |
| -4005 (futures) | QTY_GREATER_THAN_MAX_QTY | Quantity greater than the maximum quantity (futures). |
| -4013 (futures) | PRICE_LESS_THAN_MIN_PRICE | Price less than the minimum price (futures). |
| -4014 (futures) | PRICE_NOT_INCREASED_BY_TICK_SIZE | Price not increased by tick size (futures): price is not a multiple of tickSize. |
| -4015 (futures) | INVALID_CL_ORD_ID_LEN | Client order id is not valid (futures; max 36 characters). |
| -4016 (futures) | PRICE_HIGHTER_THAN_MULTIPLIER_UP | Price is higher than the mark price multiplier cap (futures). |
| -4023 (futures) | QTY_NOT_INCREASED_BY_STEP_SIZE | Quantity not increased by step size (futures): quantity is not a multiple of stepSize. |
| -4024 (futures) | PRICE_LOWER_THAN_MULTIPLIER_DOWN | Price is lower than the mark price multiplier floor (futures). |
| -4028 (futures) | INVALID_LEVERAGE | Invalid leverage (futures). |
| -4046 (futures) | NO_NEED_TO_CHANGE_MARGIN_TYPE | No need to change margin type: it is already set (futures). Harmless. |
| -4047 (futures) | THERE_EXISTS_OPEN_ORDERS | Margin type cannot be changed while there are open orders (futures). |
| -4048 (futures) | THERE_EXISTS_QUANTITY | Margin type cannot be changed while there is an open position (futures). |
| -4059 (futures) | NO_NEED_TO_CHANGE_POSITION_SIDE | No need to change position side: already set (futures). Harmless. |
| -4061 (futures) | POSITION_SIDE_NOT_MATCH | Order's position side does not match the account setting (futures one-way vs hedge mode). |
| -4062 (futures) | REDUCE_ONLY_CONFLICT | Invalid or improper reduceOnly value (futures). |
| -4116 (futures) | DUPLICATED_CLIENT_ORDER_ID | clientOrderId is duplicated (futures). |
| -4118 (futures) | REDUCE_ONLY_MARGIN_CHECK_FAILED | ReduceOnly order failed (futures): with your existing position and open orders it would open the opposite side. |
| -4120 (futures) | STOP_ORDER_SWITCH_ALGO | Order type not supported for this endpoint (futures): use the Algo Order API endpoints instead. |
| -4131 (futures) | MARKET_ORDER_REJECT | Market order rejected: the counterparty's best price is outside the PERCENT_PRICE limit (futures). |
| -4140 (futures) | INVALID_OPENING_POSITION_STATUS | Invalid symbol status for opening a position (futures). |
| -4164 (futures) | MIN_NOTIONAL | Order notional too small (futures): price x quantity must be at least the symbol minimum (often 5 USDT, some symbols more) unless reduce-only. Step-by-step fix |
| -5021 (futures) | FOK_ORDER_REJECT | FOK order rejected because it could not be filled immediately in full (futures). |
| -5022 (futures) | GTX_ORDER_REJECT | Post-only (GTX) order rejected because it would trade immediately as a taker (futures). |
| -5028 (futures) | ME_RECVWINDOW_REJECT | Timestamp outside the matching engine's recvWindow (futures). |
| -2021 (futures) | ORDER_WOULD_IMMEDIATELY_TRIGGER | Order would immediately trigger (futures stop/take-profit price is already crossed). |
| -2022 (futures) | REDUCE_ONLY_REJECT | ReduceOnly order rejected (futures). |
Bybit (v5 API): 60 codes explained in detail (of 716 official codes searchable above)
| Code | Name | Meaning |
|---|---|---|
| 10003 | API key is invalid, or the key and the domain do not match. | |
| 10016 | Server error (or service restarting). | |
| 33004 | Your API key has expired (derivatives). | |
| 10000 | Server timeout. | |
| 10001 | Request parameter error: a parameter is missing, wrong type or not allowed. | |
| 10002 | Request time outside the time window: your timestamp differs too much from Bybit server time. | |
| 10004 | Signature error: the signature does not match. | |
| 10005 | Permission denied: the API key lacks the permission for this action. | |
| 10006 | Too many visits: you exceeded the API rate limit for your UID. | |
| 10007 | User authentication failed. | |
| 10010 | Unmatched IP: your IP is not in the API key's bound IP list. | |
| 10017 | Route not found: wrong endpoint path or method. | |
| 10018 | Exceeded the IP rate limit. | |
| 10024 | Compliance rules triggered. | |
| 10027 | Transactions are banned on this account. | |
| 10029 | The requested symbol is invalid (not in the symbol whitelist). | |
| 110001 | Order does not exist. | |
| 110003 | Order price exceeds the allowable range. | |
| 110004 | Wallet balance is insufficient. | |
| 110006 | Your assets are estimated not to cover the position margin. | |
| 110007 | Available balance is insufficient for this order (margin + fees). | |
| 110008 | The order has been completed or cancelled already. | |
| 110009 | The number of stop (conditional) orders exceeds the maximum. | |
| 110012 | Insufficient available balance. | |
| 110013 | Cannot set leverage due to risk limit level. | |
| 110017 | orderQty will be truncated to zero: the quantity rounds to 0 at the lot step (size too small). | |
| 110020 | Not allowed to have more than 500 active orders. | |
| 110021 | Position limit exceeded due to open interest. | |
| 110024 | You have an existing position, so the position mode cannot be switched. | |
| 110025 | Position mode has not been modified (already set). Harmless. | |
| 110026 | Cross/isolated margin mode has not been modified (already set). Harmless. | |
| 110028 | You have open orders, so the position mode cannot be switched. | |
| 110043 | Set leverage has not been modified (leverage already at this value). Harmless. | |
| 110044 | Available margin is insufficient. | |
| 110045 | Wallet balance is insufficient. | |
| 110072 | orderLinkId is duplicated. | |
| 110079 | The order is still processing and cannot be operated; try again later. | |
| 110090 | Order rejected because the position may exceed the max limit. | |
| 110092 | Trigger price wrong side: you expected a rising trigger but triggerPrice is not above the current price. | |
| 110093 | Trigger price wrong side: you expected a falling trigger but triggerPrice is not below the current price. | |
| 110094 | Order notional value is below the lower limit. | |
| 170001 | Internal error (spot). | |
| 170005 | Too many new orders (spot order rate limit). | |
| 170033 | Margin: insufficient account balance. | |
| 170121 | Invalid symbol (spot). | |
| 170124 | Order amount too large (spot). | |
| 170130 | Data sent for a parameter is not valid (spot). | |
| 170131 | Balance insufficient (spot). | |
| 170134 | Order price has too many decimals (spot). | |
| 170136 | Order quantity is lower than the minimum (spot). Step-by-step fix | |
| 170137 | Order quantity has too many decimals (spot). | |
| 170140 | Order value is below the minimum (spot). | |
| 170148 | Market order amount has too many decimals (spot). | |
| 170193 | Buy order price cannot be higher than the allowed limit (spot). | |
| 170194 | Sell order price cannot be lower than the allowed limit (spot). | |
| 170210 | New order rejected (spot). | |
| 170213 | Order does not exist (spot). | |
| 170217 | Only LIMIT-MAKER orders are supported for this pair right now (spot). | |
| 170218 | LIMIT-MAKER order rejected due to invalid price (spot): it would take liquidity. | |
| 170222 | Too many requests in this time frame (spot). |
OKX (v5 API): 59 codes explained in detail (of 1044 official codes searchable above)
| Code | Name | Meaning |
|---|---|---|
| 1 | Operation failed: look at data[].sCode / sMsg for the real reason of each order. | |
| 2 | Bulk operation partially succeeded: some orders failed; check each data[].sCode. | |
| 50001 | Service temporarily unavailable. | |
| 50004 | Endpoint request timeout: the result is unknown (it may have succeeded). | |
| 50011 | Rate limit reached / too many requests. | |
| 50013 | Systems are busy; try again later. | |
| 50014 | A required parameter is empty. | |
| 50061 | You reached the maximum order rate limit for this account. | |
| 50100 | API frozen: contact customer service. | |
| 50101 | API key does not match the current environment (live vs demo trading). | |
| 50102 | Timestamp request expired: OK-ACCESS-TIMESTAMP is too far from server time. | |
| 50103 | Request header OK-ACCESS-KEY is empty. | |
| 50104 | Request header OK-ACCESS-PASSPHRASE is empty. | |
| 50105 | Request header OK-ACCESS-PASSPHRASE is incorrect. | |
| 50110 | Your IP is not in the API key's IP whitelist. | |
| 50111 | Invalid OK-ACCESS-KEY. | |
| 50112 | Invalid OK-ACCESS-TIMESTAMP format. | |
| 50113 | Invalid signature. | |
| 50114 | Invalid authorization. | |
| 50119 | API key does not exist. | |
| 50120 | This API key does not have permission for this function. | |
| 51000 | Parameter error: the parameter named in the message is wrong. | |
| 51001 | Instrument ID does not exist. | |
| 51006 | Order price is not within the price limit (max buy / min sell price). | |
| 51010 | Request unsupported under the current account mode. | |
| 51011 | Order ID already exists. | |
| 51016 | Client order ID already exists. | |
| 51020 | Order amount is below the minimum order size. Step-by-step fix | |
| 51023 | Position does not exist. | |
| 51024 | Trading account is blocked or restricted (sMsg gives the reason: compliance, verification, region or risk control). | |
| 51025 | Order count exceeds the limit. | |
| 51027 | Contract expired. | |
| 51094 | TP limit orders cannot be placed in spot, margin or options trading. | |
| 51100 | Take-profit / stop-loss cannot be attached to reduce-only orders. | |
| 51101 | Order size is above the maximum contracts per order. | |
| 51112 | Close order size exceeds the available size for this position. | |
| 51116 | Order price or trigger price exceeds the allowed level. | |
| 51120 | Order amount is less than the minimum. | |
| 51121 | Order quantity must be a multiple of the lot size (lotSz). Step-by-step fix | |
| 51122 | Order price is below the minimum price. | |
| 51131 | Insufficient balance. | |
| 51137 | The highest price limit for buy orders is exceeded. | |
| 51138 | The lowest price limit for sell orders is exceeded. | |
| 51149 | Order timed out: the result is unknown. | |
| 51150 | The precision of the size or price exceeds the limit. | |
| 51155 | Trading this pair/contract is restricted due to local compliance requirements. | |
| 51169 | No position in this direction to reduce. | |
| 51170 | A reduce-only order cannot be in the same direction as the existing position. | |
| 51201 | Value of the market order exceeds the maximum. | |
| 51202 | Market order amount exceeds the maximum amount. | |
| 51204 | The price for a limit order cannot be empty. | |
| 51400 | Cancellation failed: the order has been filled, cancelled or does not exist. | |
| 51503 | Order amend failed: the order has already been filled or cancelled. | |
| 51603 | Order does not exist. | |
| 59000 | Settings failed: close positions or orders before changing this setting. | |
| 59102 | Leverage exceeds the maximum limit. | |
| 59103 | Account margin is insufficient and leverage is too low. | |
| 59200 | Insufficient account balance. | |
| 51008 | Order failed: insufficient balance or margin (sub-codes 51008_xxxx give the exact case). |
What it does not do
- It does not guess. A code that is not in the official list gets "not covered" and a link to that list.
- It does not cover MetaTrader 4 (MQL4 codes like 130 or 134) or other exchanges yet.
- It does not look at your account, and it is not trading or investment advice.
Inside an AI coding tool? The same explainer is the AIKIT tool explain_trading_error for Claude, ChatGPT and Cursor, with a signed receipt for every answer. To check a whole EA or bot for these mistakes before they happen, use the free EA code check.
Sources and dates
Every meaning comes from the platform's own documentation, read on 2026-11-28: MQL5 trade return codes, MQL5 runtime errors, Binance spot errors, Binance USDS-M futures errors, Bybit v5 errors and OKX v5 error codes. The plain explanations and fix steps are ours.
Need all 2,368 error codes with fix steps as data? They are in the Pro plan of the Trading Facts Feed.