Error Codes

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)

CodeMessage
400000Invalid parameter — refer to the API documentation
400001Daily time limit exceeded
400002Page size exceeds the allowed limit
400003Page number exceeds the allowed limit
400004startTime must be earlier than endTime
400005startTime must not be in the future
400006endTime must be in the future
400007Invalid limit value
400008Request error
400009Missing required parameter — refer to the API documentation
400010Exchange error
400011Order processing is temporarily unavailable — please try again
400012Service is temporarily unavailable while loading data
400013Request timeout

Authentication & API Key (2xxx / 4xxx / 7xxx / 1000xx)

CodeMessage
500Server error
501Client error
2000API verification failed
2001Your IP address is not on this API key's whitelist
2002API authorization invalid
4000Invalid login session
7000Nonce is invalid
100001Portfolio does not exist
100002Invalid user status
100003Invalid user type
100018API key not exist
100041API key has been frozen — please contact your account manager
100429Too many requests
405001The apiKey Not Found

Trading (4010xx)

CodeMessage
401000Invalid portfolioId
401001clientOrderId must be fewer than 64 characters
401002Invalid side
401003Invalid orderType
401004Invalid timeInForce
401005Invalid orderQty
401006Invalid limitPrice
401007orderId must be exactly 16 digits
401008Either orderId or clientOrderId must be provided
401009clientOrderId already exists
401010Portfolio not found for this user
401011Symbol not supported
401012Price is invalid
401013Order quantity precision exceeds the minimum allowed
401014Order quantity is below the minimum
401015Order price precision exceeds the minimum allowed
401016Order price is below the minimum
401017Order amount should be greater than the min notional
401018Order not found
401019This order cannot be cancelled
401020Invalid orderId value
401021Invalid quoteOrderQty
401022Invalid userId from gateway
401023Invalid exchange type
401024Invalid quoteOrderQty
401025Order quantity exceeds the maximum
401026Order notional value exceeds the maximum market quote size
401027Order quantity exceeds the maximum market base size
401028Order notional value is below the minimum market quote size
401029Order quantity is below the minimum market base size
401030When querying the interface, the symbol field should be used in conjunction with the business field
401031Precision information not found
401032Position not found
401033Invalid leverage
401034Requested leverage exceeds the maximum allowed
401035Asset does not exist
401036Insufficient available balance to set this leverage
401037Leverage must be set before placing orders
401038An open close order exists — cancel it before proceeding
401039Invalid begin param
401040Invalid end param
401041The sym should be PERP businessType
401042Market orders do not support GTX time-in-force
401043An open order exists — cancel it before proceeding
401044Open order count exceeds the limit
401045Account is under risk control — order placement is suspended
401046Exchange account not initialized — transfer funds to this portfolio first
401047Reduce-only orders must be in the opposite direction of the current position
401048Cannot place a reduce-only order when position quantity is zero
401049Invalid reduceOnly value
401050Invalid statementType
401051clientOrderId may only contain letters and numbers
401052GTX order rejected — could not be filled as maker
401053Exchange account is restricted — unable to close position
401054The open order num exceeds the limit
401055Insufficient available balance
401056Unrealised loss is too large — available margin would be insufficient
401057Insufficient frozen balance
401058Insufficient available margin
401059Because there is an order with a better price, the reduce only order cannot be placed at this price
401060Position notional exceeds the limit for the current leverage — reduce leverage
401061Order placement is forbidden for this portfolioId
401062Insufficient exchange account balance
401063Exchange account available not enough
401064No account found matching the specified criteria
401066Can not find exchange account group
401067Unsupported business type
401068Due to an order with a better price, %s reduce only order to %s %s %s at %s was cancelled
401069Invalid businessType
401070Open position exceeds the maximum notional limit
401071Order quantity must be a multiple of lotSize
401072Order state or type does not allow replacement
401073Replacement quantity or price is the same as the original
401074Invalid replacement price or quantity
401075Order price must be a multiple of tickSize
401076Replace order failed — insufficient available balance
401077Replacement quantity cannot be less than the already-executed quantity
401078Replace order failed — insufficient available margin
401079Replace order failed. Your open position exceeds the maxNotional limit
401080Replace order failed. Your open position exceeds the maxNotional limit, you can decrease your leverage to increase your maxNotional limit
401081Replace order failed. Your replace will affect position frozen qty of this reduceOnly order
401082Invalid orderId
401083Min notional order currently do not support replace
401084Place order will affect min notional order
401085User borrowing limit reached
401086Tier borrowing limit reached
401087Invalid loan currency
401088Invalid positionMode
401089Change failed — cancel all open orders and close all positions first
401090Change failed. Please cancel any open order and close positions first.
401091Invalid positionSide — position mode is BOTH, so positionSide must be LONG or SHORT
401092Order would cause the exchange open-interest limit to be exceeded
401093This order is close order, but your positionQty is 0
401094Position mode is already set to the requested value
401095Your business scope only supports Binance perp
401096Invalid positionSide
401097No open position to close — position quantity is zero
401098Tpsl price precision should be less than the min price precision
401100Tpsl price should be greater than the min price
401101Close position order can not be passed with tpsl parameters
401102Invalid subPortfolioId
401103Can't change positionMode for this exchange
401104Trade exceed multi limit
401105History data export times exceed limit
401106Invalid data export type
401107Invalid data export status
401108The end time must be less than the current date 00:00
401109data export is not exist
401110The file export has not been processed yet, and the download URL cannot be generated
401111Exchange Order Matching Risk Control Cancellation
401112Due to exchange parameter adjustments, The maximum leverage for this symbol is %s. Please reduce the leverage ratio.
401113Invalid syncMode
401114Replace rejected by min notional
401115Generate order fail
401116Order is cancelling
401117Order modification or cancellation is not permitted as the order is already completed.
401118Account is liquidating, no operation allowed
401119Position size changed due to a previous fill. Please submit a new order with the updated position size.
401120There is a pending reduce-only order, please try again later
401121Another order with a worse price is pending cancellation. Please try again later.
401122The precision of the quoted currency shall be lower than the price precision %s.
401444Unknown error

Strategy / Algo Orders (4012xx)

CodeMessage
401200Invalid algo provider
401201Invalid algo order type
401202Invalid algo parameters
401203Algo order not found
401204Open algo order count exceeds the limit
401205Algo provider is inactive
401206algoOrderId is required
401207Invalid algoOrderId
401208Either algoOrderId or clientOrderId must be provided
401209Invalid order state
401211Invalid startTime
401212Invalid endTime
401213Invalid interval
401214At least one of tpTriggerPrice or slTriggerPrice must be provided
401215Invalid take-profit trigger price
401216Invalid tpTriggerType
401217Invalid tpPrice
401218Invalid stop-loss trigger price
401219Invalid slTriggerType
401220Invalid slPrice
401221Algo order not found
401222The AlgoOrder update at less than current algo order
401223Forbidden place sub order when algo order pending cancel
401224Sub order exceed algo order qty
401225The clientOrderId required
401226Sub order sym not consistent with the algo order.
401227Sub order side not consistent with the algo order.
401228Sub order reduceOnly not consistent with the algo order.
401229The clientOrderId duplicate
401230The AlgoOrder executedQty update error
401231Algo orders cannot be replaced
401232Attached TP/SL does not support close-all-position
401233Invalid conditionType
401234Invalid trigger price type
401235TP/SL close-position orders must use market price
401236Invalid conditional trigger price
401237Invalid conditional price
401238A TP/SL close-position order already exists
401239System risk control, your leverage too high, please reduce your leverage to below %s
401240invalid closeAllPos
401241If you need closeAllPos, exchangeType is required
401242If you don't need closeAllPos, symList should be empty
401243Unsupported businessType for TP/SL
401244The order quantity cannot be greater than the position quantity.
401245The close order does not match the current position.
401246Invalid tpTriggerPrice , current price: %s
401247Invalid slTriggerPrice , current price: %s

Portfolio Management (402xxx)

CodeMessage
402000Portfolio name cannot be empty
402001Portfolio name already exists
402003Portfolio does not belong to this user
402004Portfolio name cannot exceed 64 characters
402005portfolioId is required
402006portfolioId not found
402007Portfolio count exceeds the limit
402008subPortfolioId is required

Transfers (403xxx)

CodeMessage
403000Source and target portfolioId cannot both be empty
403001Invalid source portfolioId
403002Invalid target portfolioId
403003Invalid source transfer type
403004Invalid target transfer type
403005Invalid amount
403006Source portfolio not found for this user
403007Target portfolio not found for this user
403008Self-transfer is not allowed
403009Source and target are identical — transfer is not meaningful
403010Currency not supported
403011Amount precision exceeds the allowed maximum
403012Amount is below the minimum allowed
403013Insufficient transferable balance
403014Invalid transferId
403015Invalid requestId
403016requestId must be fewer than 64 characters

Fees (406xxx)

CodeMessage
406000Cannot set broker fee for the main portfolio
406001Invalid change type
406002At least one of chgMaker or chgTaker must be provided
406003Fixed add-on must be between 0.00 bp and 1000 bp
406004Fixed add-on precision must be 0.01 bp
406005Fixed add point must be a valid number.
406006Percent add point must be between 0 and 10000..
406007Percent add point must have a precision of 1.
406008Percent add point must be a valid number.
406009Invalid date format
406010Use /api/v1/broker/feeRate for broker users
406011This endpoint is only available to broker users
406012This endpoint is not available to broker users
406013No valid exchange index prices found

WebSocket (601xxx)

CodeMessage
601001Invalid parameter — refer to the API documentation
601002Subscribe/unsubscribe inst field is empty
601003Subscribe/unsubscribe inst value is invalid
601004Mismatched input, Expect input:
601005Subscription list exceeds the maximum of 20 instruments
601006Invalid channel
601007API key not found
601008Missing required field
601009Login failed
601010Connection frequency too high
601011Operation not supported
601014Subscription string too long
601015Maximum number of subscriptions exceeded
601016Login failed — invalid nonce
601017Login failed — nonce is empty
601018Login failed — signature is empty