API Reference

Error Codes Details

Show all error codes details.

Common

codemessage
400000Invalid Parameter, please check api doc
400001Exceed dayTime limit
400002Exceed pageSize limit
400003Exceed pageNum limit
400004The startTime must be less than the endTime
400005The startTime must be less than the current ms time
400006The endTime must be greater than the current ms time
400007Invalid limit value
400009Missing Parameter, please check api doc

Api Key

codemessage
2000API verification failed
2001Your IP is not included in your API key's IP whitelist.
2002API Invalid Authorization.
100041API has been frozen. Feel free to contact your account manager if you have any questions.
100002Invalid user status
100018API not exist
100001Portfolio does not exist

Trading

codemessage
401000Invalid portfolioId
401001The clientOrderId must less than 64
401002Invalid side
401003Invalid orderType
401004Invalid timeInForce
401005Invalid orderQty
401006Invalid limitPrice
401007OrderId length must be 16 digits
401008One of the field between orderId and clientOrderId must be send
401009ClientOrderId duplicate
401010User portfolio not exists
401011The sym is not supported
401012Price is not valid
401013Order quantity precision should be less than the min quantity precision
401014Order quantity should be greater than the min quantity
401015Order price precision should be less than the min price precision
401016Order price should be less than the min price
401017Order amount should be greater than the min notional
401018The order was not found
401019Not allow cancel
401020Invalid orderId value
401021Invalid quoteOrderQty
401022Invalid userId from gateway
401023Invalid exchangeType
401024Invalid quoteOrderQty
401025Order quantity should be less than the max quantity
401026Order amount should be less than the max market quote size
401027Order quantity should be less than the max market base size
401028Order amount should be great than the min market quote size
401029Order quantity should be great than the min market base size
401030When querying the interface, the symbol field should be used in conjunction with the business field
401031The precision info is Not Found
401032The position was not found
401033Invalid leverage
401034The leverage you have set exceeds the maximum leverage limit
401035Asset is not exists
401036Insufficient available for set this leverage
401037Please set leverage first
401038There is a close order, please cancel it first
401039Invalid begin param
401040Invalid end param
401041The sym should be PERP businessType
401042Market order timeInForce can't be GTX
401043There is a open order, please cancel it first
401044The open order num exceeds the limit
401045The account is under risk control, and placing orders is prohibited
401046Your exchange account has not been initialized, please transfer to this portfolio.
401047ReduceOnly orders must be in the opposite direction of the position
401048Can not place ReduceOnly order when position quantity is zero
401049Invalid reduceOnly
401050Invalid statementType
401051ClientOrderId only support letters and numbers
401052Due to the order could not be executed as maker, the GTX order will be rejected
401053Your exchange account status is restriction, unable to close position
401054The open order num exceeds the limit
401055Insufficient available
401056Your openLoss are too large, which will cause your availableMargin to insufficient
401057Insufficient frozen
401058Insufficient availableMargin
401059Because there is an order with a better price, the reduce only order cannot be placed at this price
401060Your open position exceeds the maxNotional limit, you can decrease your leverage to increase your maxNotional limit
401061Forbid order for this portfolioId
401062Insufficient exchange account amount for user
401063Exchange account available not enough
401064Select account failed, no account matching the criteria
401065Exchange account insufficient amount
401066Can not find exchange account group
401067Unsupported businessType
401068Due to an order with a better price, %s reduce only order to %s %s %s at %s was cancelled
401069Invalid businessType
401070Your open position exceeds the maxNotional limit

Portfolio

codemessage
402000The portfolioName cannot be empty
402001The portfolioName already exists
402003The portfolio not belong to this user
402004The portfolioName length cannot exceed 64
402005The portfolioId is a required field
402006The portfolioId is Not Found
402007The portfolio num exceeds the limit

Transfer

codemessage
403000The Source and target portfolioId cannot all be empty
403001Invalid sourcePortfolioId
403002Invalid targetPortfolioId
403003Invalid sourceTransferType
403004Invalid targetTransferType
403005Invalid amount
403006User source portfolio not exists
403007User target portfolio not exists
403008The pb account self transfer is meaningless operation
403009The all same transfer is meaningless operation
403010Invalid currency. The currency is currently not supported
403011Invalid precision. The Maximum precision needs to be greater than %s
403012Invalid amount. The Minimum amount needs to be greater than %s
403013Insufficient balance, available: %s
403014Invalid transferId
403015Invalid requestId
403016The requestId must less than 64

WebSocket

codemessage
601001Invalid Parameter, please check api doc
601002Invalid Parameter: subscribe or unsubscribe inst no value
601003Invalid Parameter: subscribe or unsubscribe inst error
601004Mismatched input, Expect input:
601005Invalid Parameter: subscribe or unsubscribe inst list exceeded the maximum value of 20
601006Invalid Parameter: subscribe or unsubscribe channel error
601007ApiKey Not Found
601008Missing required field
601009Login failed
601010Connection frequency is too high
601011Not support this operation
601012Login frequency is too high
601013Subscription frequency is too high
601014Subscription character is too long
601015Exceed maximum number of subscriptions