Business error codes returned in the code field of every API response
All API responses follow this envelope:
{
"code": 200000,
"message": "Success",
"data": { ... }
}
A code of 200 or 200000 indicates success. Any other value indicates an error. The message field contains a human-readable description.
Error Codes
Common (400xxx)
| Code | Message |
|---|---|
400000 | Invalid parameter — refer to the API documentation |
400001 | Daily time limit exceeded |
400002 | Page size exceeds the allowed limit |
400003 | Page number exceeds the allowed limit |
400004 | startTime must be earlier than endTime |
400005 | startTime must not be in the future |
400006 | endTime must be in the future |
400007 | Invalid limit value |
400008 | Request error |
400009 | Missing required parameter — refer to the API documentation |
400010 | Exchange error |
400011 | Order processing is temporarily unavailable — please try again |
400012 | Service is temporarily unavailable while loading data |
400013 | Request timeout |
Authentication & API Key (2xxx / 4xxx / 7xxx / 1000xx)
| Code | Message |
|---|---|
500 | Server error |
501 | Client error |
2000 | API verification failed |
2001 | Your IP address is not on this API key's whitelist |
2002 | API authorization invalid |
4000 | Invalid login session |
7000 | Nonce is invalid |
100001 | Portfolio does not exist |
100002 | Invalid user status |
100003 | Invalid user type |
100018 | API key not exist |
100041 | API key has been frozen — please contact your account manager |
100429 | Too many requests |
405001 | The apiKey Not Found |
Trading (4010xx)
| Code | Message |
|---|---|
401000 | Invalid portfolioId |
401001 | clientOrderId must be fewer than 64 characters |
401002 | Invalid side |
401003 | Invalid orderType |
401004 | Invalid timeInForce |
401005 | Invalid orderQty |
401006 | Invalid limitPrice |
401007 | orderId must be exactly 16 digits |
401008 | Either orderId or clientOrderId must be provided |
401009 | clientOrderId already exists |
401010 | Portfolio not found for this user |
401011 | Symbol not supported |
401012 | Price is invalid |
401013 | Order quantity precision exceeds the minimum allowed |
401014 | Order quantity is below the minimum |
401015 | Order price precision exceeds the minimum allowed |
401016 | Order price is below the minimum |
401017 | Order amount should be greater than the min notional |
401018 | Order not found |
401019 | This order cannot be cancelled |
401020 | Invalid orderId value |
401021 | Invalid quoteOrderQty |
401022 | Invalid userId from gateway |
401023 | Invalid exchange type |
401024 | Invalid quoteOrderQty |
401025 | Order quantity exceeds the maximum |
401026 | Order notional value exceeds the maximum market quote size |
401027 | Order quantity exceeds the maximum market base size |
401028 | Order notional value is below the minimum market quote size |
401029 | Order quantity is below the minimum market base size |
401030 | When querying the interface, the symbol field should be used in conjunction with the business field |
401031 | Precision information not found |
401032 | Position not found |
401033 | Invalid leverage |
401034 | Requested leverage exceeds the maximum allowed |
401035 | Asset does not exist |
401036 | Insufficient available balance to set this leverage |
401037 | Leverage must be set before placing orders |
401038 | An open close order exists — cancel it before proceeding |
401039 | Invalid begin param |
401040 | Invalid end param |
401041 | The sym should be PERP businessType |
401042 | Market orders do not support GTX time-in-force |
401043 | An open order exists — cancel it before proceeding |
401044 | Open order count exceeds the limit |
401045 | Account is under risk control — order placement is suspended |
401046 | Exchange account not initialized — transfer funds to this portfolio first |
401047 | Reduce-only orders must be in the opposite direction of the current position |
401048 | Cannot place a reduce-only order when position quantity is zero |
401049 | Invalid reduceOnly value |
401050 | Invalid statementType |
401051 | clientOrderId may only contain letters and numbers |
401052 | GTX order rejected — could not be filled as maker |
401053 | Exchange account is restricted — unable to close position |
401054 | The open order num exceeds the limit |
401055 | Insufficient available balance |
401056 | Unrealised loss is too large — available margin would be insufficient |
401057 | Insufficient frozen balance |
401058 | Insufficient available margin |
401059 | Because there is an order with a better price, the reduce only order cannot be placed at this price |
401060 | Position notional exceeds the limit for the current leverage — reduce leverage |
401061 | Order placement is forbidden for this portfolioId |
401062 | Insufficient exchange account balance |
401063 | Exchange account available not enough |
401064 | No account found matching the specified criteria |
401066 | Can not find exchange account group |
401067 | Unsupported business type |
401068 | Due to an order with a better price, %s reduce only order to %s %s %s at %s was cancelled |
401069 | Invalid businessType |
401070 | Open position exceeds the maximum notional limit |
401071 | Order quantity must be a multiple of lotSize |
401072 | Order state or type does not allow replacement |
401073 | Replacement quantity or price is the same as the original |
401074 | Invalid replacement price or quantity |
401075 | Order price must be a multiple of tickSize |
401076 | Replace order failed — insufficient available balance |
401077 | Replacement quantity cannot be less than the already-executed quantity |
401078 | Replace order failed — insufficient available margin |
401079 | Replace order failed. Your open position exceeds the maxNotional limit |
401080 | Replace order failed. Your open position exceeds the maxNotional limit, you can decrease your leverage to increase your maxNotional limit |
401081 | Replace order failed. Your replace will affect position frozen qty of this reduceOnly order |
401082 | Invalid orderId |
401083 | Min notional order currently do not support replace |
401084 | Place order will affect min notional order |
401085 | User borrowing limit reached |
401086 | Tier borrowing limit reached |
401087 | Invalid loan currency |
401088 | Invalid positionMode |
401089 | Change failed — cancel all open orders and close all positions first |
401090 | Change failed. Please cancel any open order and close positions first. |
401091 | Invalid positionSide — position mode is BOTH, so positionSide must be LONG or SHORT |
401092 | Order would cause the exchange open-interest limit to be exceeded |
401093 | This order is close order, but your positionQty is 0 |
401094 | Position mode is already set to the requested value |
401095 | Your business scope only supports Binance perp |
401096 | Invalid positionSide |
401097 | No open position to close — position quantity is zero |
401098 | Tpsl price precision should be less than the min price precision |
401100 | Tpsl price should be greater than the min price |
401101 | Close position order can not be passed with tpsl parameters |
401102 | Invalid subPortfolioId |
401103 | Can't change positionMode for this exchange |
401104 | Trade exceed multi limit |
401105 | History data export times exceed limit |
401106 | Invalid data export type |
401107 | Invalid data export status |
401108 | The end time must be less than the current date 00:00 |
401109 | data export is not exist |
401110 | The file export has not been processed yet, and the download URL cannot be generated |
401111 | Exchange Order Matching Risk Control Cancellation |
401112 | Due to exchange parameter adjustments, The maximum leverage for this symbol is %s. Please reduce the leverage ratio. |
401113 | Invalid syncMode |
401114 | Replace rejected by min notional |
401115 | Generate order fail |
401116 | Order is cancelling |
401117 | Order modification or cancellation is not permitted as the order is already completed. |
401118 | Account is liquidating, no operation allowed |
401119 | Position size changed due to a previous fill. Please submit a new order with the updated position size. |
401120 | There is a pending reduce-only order, please try again later |
401121 | Another order with a worse price is pending cancellation. Please try again later. |
401122 | The precision of the quoted currency shall be lower than the price precision %s. |
401444 | Unknown error |
Strategy / Algo Orders (4012xx)
| Code | Message |
|---|---|
401200 | Invalid algo provider |
401201 | Invalid algo order type |
401202 | Invalid algo parameters |
401203 | Algo order not found |
401204 | Open algo order count exceeds the limit |
401205 | Algo provider is inactive |
401206 | algoOrderId is required |
401207 | Invalid algoOrderId |
401208 | Either algoOrderId or clientOrderId must be provided |
401209 | Invalid order state |
401211 | Invalid startTime |
401212 | Invalid endTime |
401213 | Invalid interval |
401214 | At least one of tpTriggerPrice or slTriggerPrice must be provided |
401215 | Invalid take-profit trigger price |
401216 | Invalid tpTriggerType |
401217 | Invalid tpPrice |
401218 | Invalid stop-loss trigger price |
401219 | Invalid slTriggerType |
401220 | Invalid slPrice |
401221 | Algo order not found |
401222 | The AlgoOrder update at less than current algo order |
401223 | Forbidden place sub order when algo order pending cancel |
401224 | Sub order exceed algo order qty |
401225 | The clientOrderId required |
401226 | Sub order sym not consistent with the algo order. |
401227 | Sub order side not consistent with the algo order. |
401228 | Sub order reduceOnly not consistent with the algo order. |
401229 | The clientOrderId duplicate |
401230 | The AlgoOrder executedQty update error |
401231 | Algo orders cannot be replaced |
401232 | Attached TP/SL does not support close-all-position |
401233 | Invalid conditionType |
401234 | Invalid trigger price type |
401235 | TP/SL close-position orders must use market price |
401236 | Invalid conditional trigger price |
401237 | Invalid conditional price |
401238 | A TP/SL close-position order already exists |
401239 | System risk control, your leverage too high, please reduce your leverage to below %s |
401240 | invalid closeAllPos |
401241 | If you need closeAllPos, exchangeType is required |
401242 | If you don't need closeAllPos, symList should be empty |
401243 | Unsupported businessType for TP/SL |
401244 | The order quantity cannot be greater than the position quantity. |
401245 | The close order does not match the current position. |
401246 | Invalid tpTriggerPrice , current price: %s |
401247 | Invalid slTriggerPrice , current price: %s |
Portfolio Management (402xxx)
| Code | Message |
|---|---|
402000 | Portfolio name cannot be empty |
402001 | Portfolio name already exists |
402003 | Portfolio does not belong to this user |
402004 | Portfolio name cannot exceed 64 characters |
402005 | portfolioId is required |
402006 | portfolioId not found |
402007 | Portfolio count exceeds the limit |
402008 | subPortfolioId is required |
Transfers (403xxx)
| Code | Message |
|---|---|
403000 | Source and target portfolioId cannot both be empty |
403001 | Invalid source portfolioId |
403002 | Invalid target portfolioId |
403003 | Invalid source transfer type |
403004 | Invalid target transfer type |
403005 | Invalid amount |
403006 | Source portfolio not found for this user |
403007 | Target portfolio not found for this user |
403008 | Self-transfer is not allowed |
403009 | Source and target are identical — transfer is not meaningful |
403010 | Currency not supported |
403011 | Amount precision exceeds the allowed maximum |
403012 | Amount is below the minimum allowed |
403013 | Insufficient transferable balance |
403014 | Invalid transferId |
403015 | Invalid requestId |
403016 | requestId must be fewer than 64 characters |
Fees (406xxx)
| Code | Message |
|---|---|
406000 | Cannot set broker fee for the main portfolio |
406001 | Invalid change type |
406002 | At least one of chgMaker or chgTaker must be provided |
406003 | Fixed add-on must be between 0.00 bp and 1000 bp |
406004 | Fixed add-on precision must be 0.01 bp |
406005 | Fixed add point must be a valid number. |
406006 | Percent add point must be between 0 and 10000.. |
406007 | Percent add point must have a precision of 1. |
406008 | Percent add point must be a valid number. |
406009 | Invalid date format |
406010 | Use /api/v1/broker/feeRate for broker users |
406011 | This endpoint is only available to broker users |
406012 | This endpoint is not available to broker users |
406013 | No valid exchange index prices found |
WebSocket (601xxx)
| Code | Message |
|---|---|
601001 | Invalid parameter — refer to the API documentation |
601002 | Subscribe/unsubscribe inst field is empty |
601003 | Subscribe/unsubscribe inst value is invalid |
601004 | Mismatched input, Expect input: |
601005 | Subscription list exceeds the maximum of 20 instruments |
601006 | Invalid channel |
601007 | API key not found |
601008 | Missing required field |
601009 | Login failed |
601010 | Connection frequency too high |
601011 | Operation not supported |
601014 | Subscription string too long |
601015 | Maximum number of subscriptions exceeded |
601016 | Login failed — invalid nonce |
601017 | Login failed — nonce is empty |
601018 | Login failed — signature is empty |
