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

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 found
100041API key has been frozen — please contact your account manager
100429Too many requests

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
401023Invalid exchange type
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
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
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
401051clientOrderId may only contain letters and numbers
401052GTX order rejected — could not be filled as maker
401053Exchange account is restricted — unable to close position
401055Insufficient available balance
401056Unrealised loss is too large — available margin would be insufficient
401057Insufficient frozen balance
401058Insufficient available margin
401060Position notional exceeds the limit for the current leverage — reduce leverage
401061Order placement is forbidden for this portfolioId
401062Insufficient exchange account balance
401064No account found matching the specified criteria
401067Unsupported business type
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
401082Invalid orderId
401085User borrowing limit reached
401086Tier borrowing limit reached
401087Invalid loan currency
401088Invalid positionMode
401089Change failed — cancel all open orders and close all 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
401094Position mode is already set to the requested value
401096Invalid positionSide
401097No open position to close — position quantity is zero
401102Invalid subPortfolioId

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
401214At least one of tpTriggerPrice or slTriggerPrice must be provided
401215Invalid take-profit trigger price
401218Invalid stop-loss trigger price
401221Algo order not found
401231Algo orders cannot be replaced
401232Attached TP/SL does not support close-all-position
401235TP/SL close-position orders must use market price
401238A TP/SL close-position order already exists
401444Unknown error

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
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
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