Skip to main content

Error Codes

10xx - General Server or Network Issues

Primarily related to network connectivity, request rate limits, authentication, and internal server errors.

Error CodeError NameDescription / Reason
-1000UNKNOWNAn unknown error occurred while processing the request.
-1001DISCONNECTEDInternal error; unable to process the request. Please retry.
-1002UNAUTHORIZEDNot authorized to execute this request.
-1003TOO_MANY_REQUESTSToo many requests / rate limit exceeded (may result in IP ban). Consider using WebSocket.
-1004DUPLICATE_IPThe IP address is already on the whitelist.
-1005NO_SUCH_IPThe IP address is not on the whitelist.
-1006UNEXPECTED_RESPUnexpected response received from the message bus; execution status unknown.
-1007TIMEOUTTimed out waiting for a response from the backend server; execution status unknown.
-1008Request ThrottledServer overloaded or system-level protection triggered, resulting in rate limiting (only reduce-only / close-position orders are exempt).
-1014UNKNOWN_ORDER_COMPOSITIONThe current combination of order parameters is not supported.
-1015TOO_MANY_ORDERSThe number of new orders exceeds the limit.
-1016SERVICE_SHUTTING_DOWNThis service is unavailable.
-1020UNSUPPORTED_OPERATIONThis operation is not supported.
-1021INVALID_TIMESTAMPInvalid timestamp (outside recvWindow, or more than 1000ms ahead of server time).
-1022INVALID_SIGNATUREInvalid request signature.
-1023START_TIME_GREATER_THAN_END_TIMEThe start time parameter is after the end time.
-1099NOT_FOUNDNot found, not authenticated, or not authorized.

11xx - Request Parameter Issues

Primarily related to format, type, missing, or range errors in API request parameters.

Error CodeError NameDescription / Reason
-1100ILLEGAL_CHARSIllegal characters found in a parameter.
-1101TOO_MANY_PARAMETERSToo many parameters or duplicate parameter values detected.
-1102MANDATORY_PARAM_EMPTY...A mandatory parameter was not sent, is empty, or is malformed.
-1103/-1104UNKNOWN / UNREAD_PARAMAn unknown parameter was sent, or not all parameters were read.
-1105/-1106PARAM_EMPTY / NOT_REQUIREDA parameter is empty, or an unnecessary parameter was sent.
-1108/-1109BAD_ASSET / BAD_ACCOUNTInvalid asset or invalid account.
-1110/-1111BAD_INSTRUMENT_TYPE / PRECISIONIncorrect trading pair, or precision exceeds the maximum defined value.
-1112/-1113NO_DEPTH / WITHDRAW_NOT_NEGATIVENo open orders for the trading pair, or withdrawal amount must be negative.
-1114/-1115TIF_NOT_REQUIRED / INVALID_TIFTimeInForce parameter is not required or is invalid.
-1116/-1117INVALID_ORDER_TYPE / SIDEInvalid order type or order side.
-1118/-1119EMPTY_NEW_CL_ORD_ID...New or original client custom order ID is empty.
-1120/-1121BAD_INTERVAL / BAD_SYMBOLInvalid time interval or trading pair.
-1122/-1125INVALID_SYMBOL_STATUS / LISTEN_KEYIncorrect trading pair status, or listenKey does not exist.
-1126/-1127ASSET_NOT_SUPPORTED / MORE_THAN_XX_HOURSAsset not supported, or query time range is too large.
-1128/-1130OPTIONAL_PARAMS_BAD_COMBO / INVALID_PARAMETERInvalid combination of optional parameters, or invalid parameter data sent.
-1136INVALID_NEW_ORDER_RESP_TYPEInvalid newOrderRespType.

20xx - Order Processing Issues

Primarily related to account status, balance, positions, and order/cancel logic conflicts.

Error CodeError NameDescription / Reason
-2010NEW_ORDER_REJECTEDNew order rejected.
-2011/-2012CANCEL_REJECTED / CANCEL_ALL_FAILCancel order rejected, or batch cancel failed.
-2013NO_SUCH_ORDEROrder does not exist.
-2014/-2015BAD_API_KEY_FMT / REJECTED_MBX_KEYInvalid API key format, or invalid IP/permissions.
-2016/-2017NO_TRADING_WINDOW / API_KEYS_LOCKEDTrading window not found, or API key is locked.
-2018/-2019BALANCE / MARGIN_NOT_SUFFICIENTInsufficient account balance, or insufficient margin.
-2020/-2021UNABLE_TO_FILL / ORDER_WOULD_IMMEDIATELY_TRIGGERUnable to fill, or order would be immediately triggered.
-2022/-2026REDUCE_ONLY_REJECT...Reduce-only order rejected, or current order type not supported. Usually caused by conflicts with existing open orders.
-2023/-2024USER_IN_LIQUIDATION / POSITION_NOT_SUFFICIENTUser is in liquidation mode, or position is insufficient.
-2025MAX_OPEN_ORDER_EXCEEDEDMaximum number of open orders reached.
-2027/-2028MAX_LEVERAGE_RATIO / MIN_LEVERAGE_RATIOExceeds maximum position/open order size for current leverage, or reducing leverage would cause insufficient balance.

40xx - Filter and Risk Control Issues

The largest error category, primarily related to price band protection, quantity limits, tick size, position mode / asset mode switching, and various risk control restrictions.

Error CategoryCommon Error Codes and Summary
Price and Quantity Filters-4001 to -4014: Price/quantity is less than 0, does not meet the minimum requirement, exceeds the maximum limit, or does not conform to precision or tick size multiples.
Take Profit / Stop Loss Limits-4006 to -4007: Trigger price is invalid; -4183/-4184: Order price exceeds the limit range defined by trigger price and multiplier.
Account Mode Switching-4046 to -4054: Margin mode switch failed (cannot switch between cross/isolated margin when there are open orders/positions). -4167 to -4172: Multi-asset mode and single-asset mode switch failed. -4059 to -4068: One-way/hedge position mode switch failed (cannot switch position direction when there are positions/open orders).
Options-Specific Errors-4063 to -4081: Options-specific parameter, amount, ID, premium, or direction is invalid or target not found.
Leverage and Compliance Limits-4028: Incorrect leverage multiplier. -4161: Cannot reduce leverage when holding positions in isolated margin mode. -4202 to -4209: Restricted by KYC, registration time (1 month / X days limit), country compliance restrictions, or account VIP feature activation, preventing high leverage adjustments (e.g., above 20x). -4402/-4403: Region unavailable or leverage cap imposed due to compliance requirements.
Trading Risk Control-4164: Order notional value too small (typically must be >= 5 USDT, except for reduce-only orders). -4118: Reduce-only order would cause a reverse position and insufficient margin. -4192: Opening positions is prohibited during the contract cooling-off period. -4400/-4401: Violation of quantitative trading or large position risk control rules; only close-position operations are allowed.

50xx - Order Execution and Modification Issues

Primarily related to advanced order types (FOK/GTX) and the Modify Order endpoint errors.

Error CodeError NameDescription / Reason
-5021FOK_ORDER_REJECTOrder cannot be immediately fully filled; FOK order rejected and not recorded.
-5022GTX_ORDER_REJECTOrder cannot be filled solely as a maker; Post Only order rejected and not recorded.
-5024MOVE_ORDER_NOT_ALLOWED...Trading pair is not in trading status; order modification not allowed.
-5025LIMIT_ORDER_ONLYThe modify order endpoint currently only supports limit order modifications.
-5026Exceed_Maximum_Modify_Order_LimitExceeded the maximum number of modifications allowed for a single order.
-5027SAME_ORDERRequest parameters are identical to the original order; no modification needed.
-5028ME_RECVWINDOW_REJECTTimestamp is outside the matching engine's recvWindow.
-5029MODIFICATION_MIN_NOTIONALThe notional value of the modified order is below the minimum required value (typically 5 USDT).
-5037/-5038INVALID_PRICE_MATCHPrice match type is incorrect, or this order type does not support price matching.
-5039INVALID_SELF_TRADE_PREVENTION_MODEInvalid self-trade prevention (STP) mode.
-5040FUTURE_GOOD_TILL_DATEThe valid time for a GTD order must be greater than the current time + 60 seconds.
-5041BBO_ORDER_REJECTNo depth available in the current order book; BBO order cannot be matched.
-5043Existing_Pending_ModificationA modification request for this order is already being processed; do not submit concurrent modifications.