Skip to main content

Enums Definitions

category

Contract

  • linearLinear Contract, including USDT Perpetual
  • inverseInverse Contract, including Inverse Perpetual, Inverse Futures

Unified Margin

  • linearLinear Contract, including USDT Perpetual, USDC Perpetual
  • option

symbol

USDT Perpetual:

  • BTCUSDT
  • ETHUSDT

USDC Perpetual:

  • BTCPERP
  • ETHPERP

Inverse Perpetual:

  • BTCUSD
  • ETHUSD

Inverse Futures:

  • BTCUSDH23H: First quarter; 23: 2023
  • BTCUSDM23M: Second quarter; 23: 2023
  • BTCUSDU23U: Third quarter; 23: 2023
  • BTCUSDZ23Z: Fourth quarter; 23: 2023

positionIdx

  • 0one-way mode
  • 1Buy side of hedge-mode
  • 2Sell side of hedge-mode

positionStatus

  • Normal
  • Liqin the liquidation progress
  • Adlin the auto-deleverage progress

interval

  • 1 3 5 15 30 60 120 240 360 720minute
  • Dday
  • Wweek
  • Mmonth

triggerBy

  • LastPrice
  • MarkPrice
  • IndexPrice

timeInForce

  • GoodTillCancel
  • ImmediateOrCancel
  • FillOrKlii
  • PostOnly

orderFilter

  • Orderactive order
  • StopOrderconditional order

orderStatus

  • Created
  • New
  • Rejected
  • PartiallyFilled
  • Filled
  • PendingCancel
  • Cancelled
  • Untriggered
  • Triggered
  • Deactivated
  • Active

cancelType

  • CancelByUser
  • CancelByReduceOnly
  • CancelByPrepareLiq CancelAllBeforeLiq
  • CancelByPrepareAdl CancelAllBeforeAdl
  • CancelByAdmin
  • CancelByTpSlTsClear
  • CancelBySmp

Options:

  • CancelByUser
  • CancelByReduceOnly
  • CancelAllBeforeLiqCancelled due to liquidation
  • CancelAllBeforeAdlCancelled due to ADL
  • CancelBySettle
  • CancelByCannotAffordOrderCost
  • CancelByPmTrialMmOverEquity
  • CancelByAccountBlocking
  • CancelByDelivery
  • CancelByMmpTriggered
  • CancelByCrossSelfMuch
  • CancelByCrossReachMaxTradeNum
  • CancelByDCP

stopOrderType

  • TakeProfit
  • StopLoss
  • TrailingStop
  • Stop
  • PartialTakeProfit
  • PartialStopLoss

rejectReason

  • EC_NoError
  • EC_Others
  • EC_UnknownMessageType
  • EC_MissingClOrdID
  • EC_MissingOrigClOrdID
  • EC_ClOrdIDOrigClOrdIDAreTheSame
  • EC_DuplicatedClOrdID
  • EC_OrigClOrdIDDoesNotExist
  • EC_TooLateToCancel
  • EC_UnknownOrderType
  • EC_UnknownSide
  • EC_UnknownTimeInForce
  • EC_WronglyRouted
  • EC_MarketOrderPriceIsNotZero
  • EC_LimitOrderInvalidPrice
  • EC_NoEnoughQtyToFill
  • EC_NoImmediateQtyToFill
  • EC_PerCancelRequest
  • EC_MarketOrderCannotBePostOnly
  • EC_PostOnlyWillTakeLiquidity
  • EC_CancelReplaceOrder
  • EC_InvalidSymbolStatus

positionMode

  • 0One-Way Mode
  • 3Hedge Mode

execType

lastLiquidityInd

Unified Margin

  • TAKER
  • MAKER

Contract

  • AddedLiquidityadd liquidity
  • RemovedLiquiditytake liquidity

walletFundType

  • Deposit
  • Withdraw
  • RealisedPNL
  • Commission
  • Refund
  • Prize
  • ExchangeOrderWithdraw
  • ExchangeOrderDeposit
  • ReturnServiceCashRefund of handling fee bonus
  • InsuranceInsurance account transfer
  • SubMemberMain-Sub account transfer
  • CouponCoupon interest
  • AccountTransferAccount transfer
  • CashBackCash back

type

  • TRANSFER_IN
  • TRANSFER_OUT
  • TRADE
  • SETTLEMENT
  • DELIVERY
  • LIQUIDATION
  • BONUS
  • FEE_REFUND
  • INTEREST
  • CURRENCY_BUY
  • CURRENCY_SELL

adlRankIndicator

  • 0default value of empty position
  • 1
  • 2
  • 3
  • 4
  • 5

tickDirection

It indicates price fluctuation relative to the last trade.

  • PlusTickprice rise
  • ZeroPlusTicktrade occurs at the same price as the previous trade, which occurred at a price higher than that for the trade preceding it
  • MinusTickprice drop
  • ZeroMinusTicktrade occurs at the same price as the previous trade, which occurred at a price lower than that for the trade preceding it

smpType

  • default: None
  • CancelMaker
  • CancelTaker
  • CancelBoth

unifiedMarginStatus

  • 1Regular account
  • 2Unified margin account, it only trades linear perpetual and options.
  • 3Unified trade account, it can trade linear perpetual, options and spot