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
400008Common request Error
400009Missing Parameter, please check api doc
400010Exchange Error
400011Order processing error temporarily, please wait patiently
400012The service is loading data and cannot process it temporarily

Api Key

codemessage
500Server Error
501Client Server Error
2000API verification failed
2001Your IP is not included in your API key's IP whitelist.
2002API Invalid Authorization.
4000Login status error
7000Nonce is invalid
100001Portfolio does not exist
100002Invalid user status
100003invalid user type
100018API not exist
100041API has been frozen. Feel free to contact your account manager if you have any questions.
100429Too Many Requests
405001The apiKey Not Found

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 greater 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
401060Under the current leverage level, the Position Bracket exceeds the Notional Value of Configuration Item. Please reduce the leverage ratio.
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
401071Order quantity is not multiple of lotSize
401072Order state or type not allow replace
401073Replace qty or price cannot be the same as original qty
401074Replace price or qty invalid
401075Order price is not multiple of tickSize
401076Replace order failed. Insufficient available
401077Replace order qty cannot less than executedQty
401078Replace order failed. Insufficient availableMargin
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
401085UID borrowing limit
401086Tiers borrowing limit
401087Invalid loan coin
401088Invalid positionMode
401089Change failed. Please cancel any open order and close positions first.
401090Change failed. Please cancel any open order and close positions first.
401091Invalid positionSide, your positionMode is both, so positionSide must be LONG or SHORT
401092Your current order will exceed exchange the OI limit
401093This order is close order, but your positionQty is 0
401094No need to repeatedly change your position mode
401095Your business scope only supports Binance perp
401096Invalid positionSide
401097Your positionQty is 0, no need to close
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

Strategy

codemessage
401200Invalid algoProvider
401201Invalid algoOrderType
401202Invalid algoParams
401203The algoOrder was not found
401204The open order num exceeds the limit
401205The algo provider is inactive
401206The algoOrderId required
401207Invalid algoOrderId
401208One of the field between algoOrderId and clientOrderId must be send
401209Invalid orderState
401211Invalid startTime
401212Invalid endTime
401213Invalid interval
401214One of the field between tpTriggerPrice and slTriggerPrice must be send
401215Invalid tpTriggerPrice
401216Invalid tpTriggerType
401217Invalid tpPrice
401218Invalid slTriggerPrice
401219Invalid slTriggerType
401220Invalid slPrice
401221The AlgoOrder was 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 order not allowed replace
401232Attached tp_sl not allowed close position
401233Invalid conditionType
401234Invalid trigger price type
401235TpSl close position only allow market price
401236Invalid conditional trigger price
401237Invalid conditional price
401238TpSl for close position exist
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
401444Unknown error

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
402008The subPortfolioId is a required field

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 transferAvailable, transferAvailable: %s
403014Invalid transferId
403015Invalid requestId
403016The requestId must less than 64

Fee

codemessage
406000Not allowed set broker fee for main portfolio
406001Invalid chgType
406002One of the field between chgMaker and chgTaker must be send
406003Fixed add point must be between 0.00bp and 1000bp.
406004Fixed add point must have a precision of 0.01bp.
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 patten
406010Please invoke endpoint:/api/v1/broker/feeRate for broker user.
406011This endpoint is only applicable to broker users.
406012This endpoint is not applicable to broker users.
406013No valid exchange index prices found.

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
601014Subscription character is too long
601015Exceed maximum number of subscriptions
601016Login failed, invalid nonce
601017Login failed, nonce is empty
601018Login failed, signature is empty