Documentation ¶
Index ¶
- Constants
- Variables
- type AccountType
- type AccountTypeV5
- type CancelOrderResponse
- type CancelOrderResult
- type Category
- type Coin
- type CollateralSwitchV5
- type CommonResponse
- type ContractType
- type CreateOrderResponse
- type CreateOrderResult
- type DepositStatusV5
- type Direction
- type ExecType
- type ExecTypeV5
- type GetInstrumentsInfoLinearInverseResult
- type GetInstrumentsInfoOptionResult
- type GetInstrumentsInfoResponse
- type GetInstrumentsInfoResult
- type GetInstrumentsInfoSpotResult
- type GetPositionInfoItem
- type GetPositionInfoList
- type GetPositionInfoResponse
- type GetPositionInfoResult
- type GetServerTimeResponse
- type GetServerTimeResult
- type GetTickersLinearInverseResult
- type GetTickersOptionResult
- type GetTickersResponse
- type GetTickersResult
- type GetTickersSpotResult
- type GetWalletBalanceResponse
- type Innovation
- type InstrumentStatus
- type InternalDepositStatusV5
- type Interval
- type IsLeverage
- type IsLowestRisk
- type LotSizeFilter
- type MarginMode
- type OptionsType
- type Order
- type OrderFilter
- type OrderStatus
- type OrderType
- type Period
- type PositionIdx
- type PositionMarginMode
- type PositionMode
- type PriceFilter
- type Side
- type SymbolData
- type TickDirection
- type TimeInForce
- type TpSlMode
- type TransactionLogTypeV5
- type TransferStatusV5
- type TriggerBy
- type TriggerDirection
- type UnifiedMarginStatus
- type WalletBalanceCoin
- type WalletBalanceList
- type WalletBalanceResult
- type WebsocketPrivateOrderData
- type WebsocketPrivateOrderResponse
- type WebsocketPrivatePositionData
- type WebsocketPrivatePositionResponse
- type WebsocketPrivateTopic
- type WebsocketPrivateWalletCoin
- type WebsocketPrivateWalletData
- type WebsocketPrivateWalletResponse
- type WebsocketPublicOrderBookAsks
- type WebsocketPublicOrderBookBids
- type WebsocketPublicOrderBookData
- type WebsocketPublicOrderBookResponse
- type WithdrawStatusV5
- type WithdrawTypeV5
Constants ¶
View Source
const ( // MarginModeRegular : MarginModeRegular = MarginMode("REGULAR_MARGIN") // MarginModePortfolio : MarginModePortfolio = MarginMode("PORTFOLIO_MARGIN") )
View Source
const ( // CategorySpot : CategorySpot = Category("spot") // CategoryLinear : CategoryLinear = Category("linear") // CategoryInverse : CategoryInverse = Category("inverse") // CategoryOption : CategoryOption = Category("option") )
View Source
const ( // TriggerDirectionRise : triggered when market price rises TriggerDirectionRise = TriggerDirection(1) // TriggerDirectionFall : triggered when market price falls TriggerDirectionFall = TriggerDirection(2) )
View Source
const ( // IsLeverageFalse : false then spot trading IsLeverageFalse = IsLeverage(0) // IsLeverageTrue : true then margin trading IsLeverageTrue = IsLeverage(1) )
View Source
const ( // OrderFilterOrder : OrderFilterOrder = OrderFilter("Order") // OrderFilterStopOrder : OrderFilterStopOrder = OrderFilter("StopOrder") // OrderFilterTpSlOrder : OrderFilterTpSlOrder = OrderFilter("tpslOrder") )
View Source
const ( // TriggerByLastPrice : TriggerByLastPrice = TriggerBy("LastPrice") // TriggerByIndexPrice : TriggerByIndexPrice = TriggerBy("IndexPrice") // TriggerByMarkPrice : TriggerByMarkPrice = TriggerBy("MarkPrice") )
View Source
const ( PositionIdxOneWay = PositionIdx(0) PositionIdxHedgeBuy = PositionIdx(1) PositionIdxHedgeSell = PositionIdx(2) )
PositionIdx :
View Source
const ( ContractTypeInversePerpetual = ContractType("InversePerpetual") ContractTypeLinearPerpetual = ContractType("LinearPerpetual") ContractTypeInverseFutures = ContractType("InverseFutures") )
ContractType :
View Source
const ( // linear & inverse: InstrumentStatusPending = InstrumentStatus("Pending") InstrumentStatusTrading = InstrumentStatus("Trading") InstrumentStatusSettling = InstrumentStatus("Settling") InstrumentStatusClosed = InstrumentStatus("Closed") // option InstrumentStatusWaitingOnline = InstrumentStatus("WAITING_ONLINE") InstrumentStatusOnline = InstrumentStatus("ONLINE") InstrumentStatusDelivering = InstrumentStatus("DELIVERING") InstrumentStatusOffline = InstrumentStatus("OFFLINE") // spot InstrumentStatusAvailable = InstrumentStatus("1") )
InstrumentStatus :
View Source
const ( OptionsTypeCall = OptionsType("Call") OptionsTypePut = OptionsType("Put") )
OptionsType :
View Source
const ( InnovationFalse = Innovation("0") InnovationTrue = Innovation("1") )
Innovation :
View Source
const ( // PositionModeMergedSingle : PositionModeMergedSingle = PositionMode(0) // PositionModeBothSides : PositionModeBothSides = PositionMode(3) )
View Source
const ( // PositionMarginCross : PositionMarginCross = PositionMarginMode(0) // PositionMarginIsolated : PositionMarginIsolated = PositionMarginMode(1) )
View Source
const ( // ExecTypeV5Trade : ExecTypeV5Trade = ExecTypeV5("Trade") // ExecTypeV5BustTrade : ExecTypeV5BustTrade = ExecTypeV5("BustTrade") // ExecTypeV5SessionSettlePnL : ExecTypeV5SessionSettlePnL = ExecTypeV5("SessionSettlePnL") // ExecTypeV5Settle : ExecTypeV5Settle = ExecTypeV5("Settle") )
View Source
const ( // TransferStatusV5SUCCESS : TransferStatusV5SUCCESS = TransferStatusV5("SUCCESS") // TransferStatusV5PENDING : TransferStatusV5PENDING = TransferStatusV5("PENDING") // TransferStatusV5FAILED : TransferStatusV5FAILED = TransferStatusV5("FAILED") )
View Source
const ( // AccountTypeV5CONTRACT : AccountTypeV5CONTRACT = AccountTypeV5("CONTRACT") // AccountTypeV5SPOT : AccountTypeV5SPOT = AccountTypeV5("SPOT") // AccountTypeV5INVESTMENT : AccountTypeV5INVESTMENT = AccountTypeV5("INVESTMENT") // AccountTypeV5OPTION : AccountTypeV5OPTION = AccountTypeV5("OPTION") // AccountTypeV5UNIFIED : AccountTypeV5UNIFIED = AccountTypeV5("UNIFIED") // AccountTypeV5FUND : AccountTypeV5FUND = AccountTypeV5("FUND") )
View Source
const ( // UnifiedMarginStatusRegular : Regular account UnifiedMarginStatusRegular = UnifiedMarginStatus(1) // UnifiedMarginStatusUnifiedMargin : Unified margin account, it only trades linear perpetual and options. UnifiedMarginStatusUnifiedMargin = UnifiedMarginStatus(2) // UnifiedMarginStatusUnifiedTrade : Unified trade account, it can trade linear perpetual, options and spot UnifiedMarginStatusUnifiedTrade = UnifiedMarginStatus(3) )
View Source
const ( TransactionLogTypeV5TRANSFERIN = TransactionLogTypeV5("TRANSFER_IN") TransactionLogTypeV5TRANSFEROUT = TransactionLogTypeV5("TRANSFER_OUT") TransactionLogTypeV5TRADE = TransactionLogTypeV5("TRADE") TransactionLogTypeV5SETTLEMENT = TransactionLogTypeV5("SETTLEMENT") TransactionLogTypeV5DELIVERY = TransactionLogTypeV5("DELIVERY") TransactionLogTypeV5LIQUIDATION = TransactionLogTypeV5("LIQUIDATION") TransactionLogTypeV5BONUS = TransactionLogTypeV5("BONUS") TransactionLogTypeV5FEEREFUND = TransactionLogTypeV5("FEE_REFUND") TransactionLogTypeV5INTEREST = TransactionLogTypeV5("INTEREST") TransactionLogTypeV5CURRENCYBUY = TransactionLogTypeV5("CURRENCY_BUY") TransactionLogTypeV5CURRENCYSELL = TransactionLogTypeV5("CURRENCY_SELL") )
View Source
const ( InternalDepositStatusV5Processing = InternalDepositStatusV5(1) InternalDepositStatusV5Success = InternalDepositStatusV5(2) InternalDepositStatusV5Failed = InternalDepositStatusV5(3) )
View Source
const ( DepositStatusV5Unknown = DepositStatusV5(0) DepositStatusV5ToBeConfirmed = DepositStatusV5(1) DepositStatusV5Processing = DepositStatusV5(2) DepositStatusV5Success = DepositStatusV5(3) DepositStatusV5Failed = DepositStatusV5(4) )
View Source
const ( WithdrawTypeOnChain = WithdrawTypeV5(0) WithdrawTypeOffChain = WithdrawTypeV5(1) WithdrawTypeAll = WithdrawTypeV5(2) )
View Source
const ( WithdrawStatusV5SecurityCheck = WithdrawStatusV5("SecurityCheck") WithdrawStatusV5Pending = WithdrawStatusV5("Pending") WithdrawStatusV5Success = WithdrawStatusV5("success") WithdrawStatusV5CancelByUser = WithdrawStatusV5("CancelByUser") WithdrawStatusV5Reject = WithdrawStatusV5("Reject") WithdrawStatusV5Fail = WithdrawStatusV5("Fail") WithdrawStatusV5BlockchainConfirmed = WithdrawStatusV5("BlockchainConfirmed") )
View Source
const ( IsLowestRiskFalse = IsLowestRisk(0) IsLowestRiskTrue = IsLowestRisk(1) )
View Source
const ( CollateralSwitchV5On = CollateralSwitchV5("ON") CollateralSwitchV5Off = CollateralSwitchV5("OFF") )
View Source
const ( // CoinBTC : CoinBTC = Coin("BTC") // CoinETH : CoinETH = Coin("ETH") // CoinEOS : CoinEOS = Coin("EOS") // CoinXRP : CoinXRP = Coin("XRP") // CoinUSDT : CoinUSDT = Coin("USDT") )
View Source
const ( // SideNone : not defined officially SideNone = Side("None") // SideBuy : SideBuy = Side("Buy") // SideSell : SideSell = Side("Sell") )
View Source
const ( // OrderTypeLimit : OrderTypeLimit = OrderType("Limit") // OrderTypeMarket : OrderTypeMarket = OrderType("Market") )
View Source
const ( // OrderStatusCreated : OrderStatusCreated = OrderStatus("Created") // OrderStatusRejected : OrderStatusRejected = OrderStatus("Rejected") // OrderStatusNew : OrderStatusNew = OrderStatus("New") // OrderStatusPartiallyFilled : OrderStatusPartiallyFilled = OrderStatus("PartiallyFilled") // OrderStatusFilled : OrderStatusFilled = OrderStatus("Filled") // OrderStatusCancelled : OrderStatusCancelled = OrderStatus("Cancelled") // OrderStatusPendingCancel : OrderStatusPendingCancel = OrderStatus("PendingCancel") // OrderStatusUntriggered : Only for conditional orders OrderStatusUntriggered = OrderStatus("Untriggered") // OrderStatusDeactivated : Only for conditional orders OrderStatusDeactivated = OrderStatus("Deactivated") // OrderStatusTriggered : Only for conditional orders OrderStatusTriggered = OrderStatus("Triggered") // OrderStatusActive : Only for conditional orders OrderStatusActive = OrderStatus("Active") )
View Source
const ( // OrderDesc : OrderDesc = "desc" // OrderAsc : OrderAsc = "asc" )
View Source
const ( // TimeInForceGoodTillCancel : TimeInForceGoodTillCancel = TimeInForce("GoodTillCancel") // TimeInForceImmediateOrCancel : TimeInForceImmediateOrCancel = TimeInForce("ImmediateOrCancel") // TimeInForceFillOrKill : TimeInForceFillOrKill = TimeInForce("FillOrKill") // TimeInForcePostOnly : TimeInForcePostOnly = TimeInForce("PostOnly") )
View Source
const ( // Interval1 : Interval1 = Interval("1") // Interval3 : Interval3 = Interval("3") // Interval5 : Interval5 = Interval("5") // Interval15 : Interval15 = Interval("15") // Interval30 : Interval30 = Interval("30") // Interval60 : Interval60 = Interval("60") // Interval120 : Interval120 = Interval("120") // Interval240 : Interval240 = Interval("240") // Interval360 : Interval360 = Interval("360") // Interval720 : Interval720 = Interval("720") // IntervalD : IntervalD = Interval("D") // IntervalW : IntervalW = Interval("W") // IntervalM : IntervalM = Interval("M") )
View Source
const ( // TickDirectionPlusTick : TickDirectionPlusTick = TickDirection("PlusTick") // TickDirectionZeroPlusTick : TickDirectionZeroPlusTick = TickDirection("ZeroPlusTick") // TickDirectionMinusTick : TickDirectionMinusTick = TickDirection("MinusTick") // TickDirectionZeroMinusTick : TickDirectionZeroMinusTick = TickDirection("ZeroMinusTick") )
View Source
const ( // Period5min : Period5min = Period("5min") // Period15min : Period15min = Period("15min") // Period30min : Period30min = Period("30min") // Period1h : Period1h = Period("1h") // Period4h : Period4h = Period("4h") // Period1d : Period1d = Period("1d") )
View Source
const ( // TpSlModeFull : TpSlModeFull = TpSlMode("Full") // TpSlModePartial : TpSlModePartial = TpSlMode("Partial") )
View Source
const ( // ExecTypeTrade : ExecTypeTrade = ExecType("Trade") // ExecTypeAdlTrade : ExecTypeAdlTrade = ExecType("AdlTrade") // ExecTypeFunding : ExecTypeFunding = ExecType("Funding") // ExecTypeBustTrade : ExecTypeBustTrade = ExecType("BustTrade") )
View Source
const ( // DirectionPrev : DirectionPrev = Direction("prev") // DirectionNext : DirectionNext = Direction("next") )
Variables ¶
View Source
var Intervals = []Interval{ Interval1, Interval3, Interval5, Interval15, Interval30, Interval60, Interval120, Interval240, Interval360, Interval720, IntervalD, IntervalW, IntervalM, }
Functions ¶
This section is empty.
Types ¶
type AccountType ¶
type AccountType string
AccountType :
const ( AccountTypeUnified AccountType = "UNIFIED" AccountTypeNormal AccountType = "CONTRACT" AccountTypeFunding AccountType = "FUND" )
type CancelOrderResponse ¶
type CancelOrderResponse struct { CommonResponse `json:",inline"` Result CancelOrderResult `json:"result"` }
type CancelOrderResult ¶
type CollateralSwitchV5 ¶
type CollateralSwitchV5 string
type CommonResponse ¶
type CreateOrderResponse ¶
type CreateOrderResponse struct { CommonResponse `json:",inline"` Result CreateOrderResult `json:"result"` }
type CreateOrderResult ¶
type GetInstrumentsInfoLinearInverseResult ¶
type GetInstrumentsInfoLinearInverseResult struct { Category Category `json:"category"` NextPageCursor string `json:"nextPageCursor"` List []struct { Symbol string `json:"symbol"` ContractType ContractType `json:"contractType"` Status InstrumentStatus `json:"status"` BaseCoin Coin `json:"baseCoin"` QuoteCoin Coin `json:"quoteCoin"` SettleCoin Coin `json:"settleCoin"` LaunchTime string `json:"launchTime"` DeliveryTime string `json:"deliveryTime"` DeliveryFeeRate string `json:"deliveryFeeRate"` PriceScale string `json:"priceScale"` LeverageFilter struct { MinLeverage string `json:"minLeverage"` MaxLeverage string `json:"maxLeverage"` LeverageStep string `json:"leverageStep"` } `json:"leverageFilter"` PriceFilter struct { MinPrice string `json:"minPrice"` MaxPrice string `json:"maxPrice"` TickSize string `json:"tickSize"` } `json:"priceFilter"` LotSizeFilter struct { MaxOrderQty string `json:"maxOrderQty"` MinOrderQty string `json:"minOrderQty"` QtyStep string `json:"qtyStep"` PostOnlyMaxOrderQty string `json:"postOnlyMaxOrderQty"` } `json:"lotSizeFilter"` UnifiedMarginTrade bool `json:"unifiedMarginTrade"` FundingInterval int `json:"fundingInterval"` } `json:"list"` }
type GetInstrumentsInfoOptionResult ¶
type GetInstrumentsInfoOptionResult struct { Category string `json:"category"` NextPageCursor string `json:"nextPageCursor"` List []struct { Symbol string `json:"symbol"` OptionsType OptionsType `json:"optionsType"` Status InstrumentStatus `json:"status"` BaseCoin Coin `json:"baseCoin"` QuoteCoin Coin `json:"quoteCoin"` SettleCoin Coin `json:"settleCoin"` LaunchTime string `json:"launchTime"` DeliveryTime string `json:"deliveryTime"` DeliveryFeeRate string `json:"deliveryFeeRate"` PriceFilter struct { MinPrice string `json:"minPrice"` MaxPrice string `json:"maxPrice"` TickSize string `json:"tickSize"` } `json:"priceFilter"` LotSizeFilter struct { MaxOrderQty string `json:"maxOrderQty"` MinOrderQty string `json:"minOrderQty"` QtyStep string `json:"qtyStep"` } `json:"lotSizeFilter"` } `json:"list"` }
type GetInstrumentsInfoResponse ¶
type GetInstrumentsInfoResponse struct { CommonResponse `json:",inline"` Result GetInstrumentsInfoResult `json:"result"` }
type GetInstrumentsInfoResult ¶
type GetInstrumentsInfoResult struct { LinearInverse *GetInstrumentsInfoLinearInverseResult Option *GetInstrumentsInfoOptionResult Spot *GetInstrumentsInfoSpotResult }
func (*GetInstrumentsInfoResult) UnmarshalJSON ¶
func (r *GetInstrumentsInfoResult) UnmarshalJSON(data []byte) error
type GetInstrumentsInfoSpotResult ¶
type GetInstrumentsInfoSpotResult struct { Category Category `json:"category"` List []SymbolData `json:"list"` }
type GetPositionInfoItem ¶
type GetPositionInfoItem struct { Symbol string `json:"symbol"` Leverage string `json:"leverage"` AvgPrice string `json:"avgPrice"` LiqPrice string `json:"liqPrice"` RiskLimitValue string `json:"riskLimitValue"` TakeProfit string `json:"takeProfit"` PositionValue string `json:"positionValue"` TpSlMode TpSlMode `json:"tpslMode"` RiskID int `json:"riskId"` TrailingStop string `json:"trailingStop"` UnrealisedPnl string `json:"unrealisedPnl"` MarkPrice string `json:"markPrice"` CumRealisedPnl string `json:"cumRealisedPnl"` PositionMM string `json:"positionMM"` CreatedTime string `json:"createdTime"` PositionIdx int `json:"positionIdx"` PositionIM string `json:"positionIM"` UpdatedTime string `json:"updatedTime"` Side Side `json:"side"` BustPrice string `json:"bustPrice"` Size string `json:"size"` PositionStatus string `json:"positionStatus"` StopLoss string `json:"stopLoss"` TradeMode int `json:"tradeMode"` }
type GetPositionInfoList ¶
type GetPositionInfoList []GetPositionInfoItem
type GetPositionInfoResponse ¶
type GetPositionInfoResponse struct { CommonResponse `json:",inline"` Result GetPositionInfoResult `json:"result"` }
type GetPositionInfoResult ¶
type GetPositionInfoResult struct { Category Category `json:"category"` NextPageCursor string `json:"nextPageCursor"` List GetPositionInfoList `json:"list"` }
type GetServerTimeResponse ¶
type GetServerTimeResponse struct { CommonResponse `json:",inline"` Result GetServerTimeResult `json:"result"` }
type GetServerTimeResult ¶
type GetTickersLinearInverseResult ¶
type GetTickersLinearInverseResult struct { Category Category `json:"category"` List []struct { Symbol string `json:"symbol"` LastPrice string `json:"lastPrice"` IndexPrice string `json:"indexPrice"` MarkPrice string `json:"markPrice"` PrevPrice24H string `json:"prevPrice24h"` Price24HPcnt string `json:"price24hPcnt"` HighPrice24H string `json:"highPrice24h"` LowPrice24H string `json:"lowPrice24h"` PrevPrice1H string `json:"prevPrice1h"` OpenInterest string `json:"openInterest"` OpenInterestValue string `json:"openInterestValue"` Turnover24H string `json:"turnover24h"` Volume24H string `json:"volume24h"` FundingRate string `json:"fundingRate"` NextFundingTime string `json:"nextFundingTime"` PredictedDeliveryPrice string `json:"predictedDeliveryPrice"` BasisRate string `json:"basisRate"` DeliveryFeeRate string `json:"deliveryFeeRate"` DeliveryTime string `json:"deliveryTime"` Ask1Size string `json:"ask1Size"` Bid1Price string `json:"bid1Price"` Ask1Price string `json:"ask1Price"` Bid1Size string `json:"bid1Size"` } `json:"list"` }
type GetTickersOptionResult ¶
type GetTickersOptionResult struct { Category Category `json:"category"` List []struct { Symbol string `json:"symbol"` Bid1Price string `json:"bid1Price"` Bid1Size string `json:"bid1Size"` Bid1Iv string `json:"bid1Iv"` Ask1Price string `json:"ask1Price"` Ask1Size string `json:"ask1Size"` Ask1Iv string `json:"ask1Iv"` LastPrice string `json:"lastPrice"` HighPrice24H string `json:"highPrice24h"` LowPrice24H string `json:"lowPrice24h"` MarkPrice string `json:"markPrice"` IndexPrice string `json:"indexPrice"` MarkIv string `json:"markIv"` UnderlyingPrice string `json:"underlyingPrice"` OpenInterest string `json:"openInterest"` Turnover24H string `json:"turnover24h"` Volume24H string `json:"volume24h"` TotalVolume string `json:"totalVolume"` TotalTurnover string `json:"totalTurnover"` Delta string `json:"delta"` Gamma string `json:"gamma"` Vega string `json:"vega"` Theta string `json:"theta"` PredictedDeliveryPrice string `json:"predictedDeliveryPrice"` Change24H string `json:"change24h"` } `json:"list"` }
type GetTickersResponse ¶
type GetTickersResponse struct { CommonResponse `json:",inline"` Result GetTickersResult `json:"result"` }
type GetTickersResult ¶
type GetTickersResult struct { LinearInverse *GetTickersLinearInverseResult Option *GetTickersOptionResult Spot *GetTickersSpotResult }
func (*GetTickersResult) UnmarshalJSON ¶
func (r *GetTickersResult) UnmarshalJSON(data []byte) error
type GetTickersSpotResult ¶
type GetTickersSpotResult struct { Category Category `json:"category"` List []struct { Symbol string `json:"symbol"` Bid1Price string `json:"bid1Price"` Bid1Size string `json:"bid1Size"` Ask1Price string `json:"ask1Price"` Ask1Size string `json:"ask1Size"` LastPrice string `json:"lastPrice"` PrevPrice24H string `json:"prevPrice24h"` Price24HPcnt string `json:"price24hPcnt"` HighPrice24H string `json:"highPrice24h"` LowPrice24H string `json:"lowPrice24h"` Turnover24H string `json:"turnover24h"` Volume24H string `json:"volume24h"` UsdIndexPrice string `json:"usdIndexPrice"` } `json:"list"` }
type GetWalletBalanceResponse ¶
type GetWalletBalanceResponse struct { CommonResponse `json:",inline"` Result WalletBalanceResult `json:"result"` }
type IsLowestRisk ¶
type IsLowestRisk int
type LotSizeFilter ¶
type PriceFilter ¶
type PriceFilter struct {
TickSize string `json:"tickSize"`
}
type SymbolData ¶
type SymbolData struct { Symbol string `json:"symbol"` BaseCoin Coin `json:"baseCoin"` QuoteCoin Coin `json:"quoteCoin"` Innovation Innovation `json:"innovation"` Status InstrumentStatus `json:"status"` LotSizeFilter LotSizeFilter `json:"lotSizeFilter"` PriceFilter PriceFilter `json:"priceFilter"` }
type WalletBalanceCoin ¶
type WalletBalanceCoin struct { AvailableToBorrow string `json:"availableToBorrow"` AccruedInterest string `json:"accruedInterest"` AvailableToWithdraw string `json:"availableToWithdraw"` TotalOrderIM string `json:"totalOrderIM"` Equity string `json:"equity"` TotalPositionMM string `json:"totalPositionMM"` UsdValue string `json:"usdValue"` UnrealisedPnl string `json:"unrealisedPnl"` BorrowAmount string `json:"borrowAmount"` TotalPositionIM string `json:"totalPositionIM"` WalletBalance string `json:"walletBalance"` CumRealisedPnl string `json:"cumRealisedPnl"` Free string `json:"free"` Locked string `json:"locked"` Coin Coin `json:"coin"` }
type WalletBalanceList ¶
type WalletBalanceList struct { TotalEquity string `json:"totalEquity"` AccountIMRate string `json:"accountIMRate"` TotalMarginBalance string `json:"totalMarginBalance"` TotalInitialMargin string `json:"totalInitialMargin"` AccountType string `json:"accountType"` TotalAvailableBalance string `json:"totalAvailableBalance"` AccountMMRate string `json:"accountMMRate"` TotalPerpUPL string `json:"totalPerpUPL"` TotalWalletBalance string `json:"totalWalletBalance"` TotalMaintenanceMargin string `json:"totalMaintenanceMargin"` Coin []WalletBalanceCoin `json:"coin"` }
type WalletBalanceResult ¶
type WalletBalanceResult struct {
List []WalletBalanceList `json:"list"`
}
type WebsocketPrivateOrderData ¶
type WebsocketPrivateOrderData struct { AvgPrice string `json:"avgPrice"` BlockTradeID string `json:"blockTradeId"` CancelType string `json:"cancelType"` Category string `json:"category"` CloseOnTrigger bool `json:"closeOnTrigger"` CreatedTime string `json:"createdTime"` CumExecFee string `json:"cumExecFee"` CumExecQty string `json:"cumExecQty"` CumExecValue string `json:"cumExecValue"` LeavesQty string `json:"leavesQty"` LeavesValue string `json:"leavesValue"` OrderID string `json:"orderId"` OrderIv string `json:"orderIv"` IsLeverage string `json:"isLeverage"` LastPriceOnCreated string `json:"lastPriceOnCreated"` OrderStatus OrderStatus `json:"orderStatus"` OrderLinkID string `json:"orderLinkId"` OrderType OrderType `json:"orderType"` PositionIdx int `json:"positionIdx"` Price string `json:"price"` Qty string `json:"qty"` ReduceOnly bool `json:"reduceOnly"` RejectReason string `json:"rejectReason"` Side Side `json:"side"` SlTriggerBy TriggerBy `json:"slTriggerBy"` StopLoss string `json:"stopLoss"` StopOrderType string `json:"stopOrderType"` Symbol string `json:"symbol"` TakeProfit string `json:"takeProfit"` TimeInForce TimeInForce `json:"timeInForce"` TpTriggerBy TriggerBy `json:"tpTriggerBy"` TriggerBy TriggerBy `json:"triggerBy"` TriggerDirection TriggerDirection `json:"triggerDirection"` TriggerPrice string `json:"triggerPrice"` UpdatedTime string `json:"updatedTime"` }
type WebsocketPrivateOrderResponse ¶
type WebsocketPrivateOrderResponse struct { ID string `json:"id"` Topic WebsocketPrivateTopic `json:"topic"` CreationTime int64 `json:"creationTime"` Data []WebsocketPrivateOrderData `json:"data"` }
type WebsocketPrivatePositionData ¶
type WebsocketPrivatePositionData struct { AutoAddMargin int `json:"autoAddMargin"` PositionIdx int `json:"positionIdx"` TradeMode int `json:"tradeMode"` RiskID int `json:"riskId"` RiskLimitValue string `json:"riskLimitValue"` Symbol string `json:"symbol"` Side Side `json:"side"` Size string `json:"size"` EntryPrice string `json:"entryPrice"` Leverage string `json:"leverage"` PositionValue string `json:"positionValue"` MarkPrice string `json:"markPrice"` PositionBalance string `json:"positionBalance"` PositionIM string `json:"positionIM"` PositionMM string `json:"positionMM"` TakeProfit string `json:"takeProfit"` StopLoss string `json:"stopLoss"` TrailingStop string `json:"trailingStop"` UnrealisedPnl string `json:"unrealisedPnl"` CumRealisedPnl string `json:"cumRealisedPnl"` CreatedTime string `json:"CreatedTime"` UpdatedTime string `json:"updatedTime"` TpslMode TpSlMode `json:"tpslMode"` LiqPrice string `json:"liqPrice"` BustPrice string `json:"bustPrice"` Category Category `json:"category"` PositionStatus string `json:"positionStatus"` }
type WebsocketPrivatePositionResponse ¶
type WebsocketPrivatePositionResponse struct { ID string `json:"id"` Topic WebsocketPrivateTopic `json:"topic"` CreationTime int64 `json:"creationTime"` Data []WebsocketPrivatePositionData `json:"data"` }
type WebsocketPrivateTopic ¶
type WebsocketPrivateTopic string
WebsocketPrivateTopic :
const ( V5WebsocketPrivateTopicPong WebsocketPrivateTopic = "pong" V5WebsocketPrivateTopicOrder WebsocketPrivateTopic = "order" V5WebsocketPrivateTopicPosition WebsocketPrivateTopic = "position" V5WebsocketPrivateTopicWallet WebsocketPrivateTopic = "wallet" )
type WebsocketPrivateWalletCoin ¶
type WebsocketPrivateWalletCoin struct { Coin Coin `json:"coin"` Equity string `json:"equity"` UsdValue string `json:"usdValue"` WalletBalance string `json:"walletBalance"` AvailableToWithdraw string `json:"availableToWithdraw"` AvailableToBorrow string `json:"availableToBorrow"` BorrowAmount string `json:"borrowAmount"` AccruedInterest string `json:"accruedInterest"` TotalOrderIM string `json:"totalOrderIM"` TotalPositionIM string `json:"totalPositionIM"` TotalPositionMM string `json:"totalPositionMM"` UnrealisedPnl string `json:"unrealisedPnl"` CumRealisedPnl string `json:"cumRealisedPnl"` }
type WebsocketPrivateWalletData ¶
type WebsocketPrivateWalletData struct { AccountIMRate string `json:"accountIMRate"` AccountMMRate string `json:"accountMMRate"` TotalEquity string `json:"totalEquity"` TotalWalletBalance string `json:"totalWalletBalance"` TotalMarginBalance string `json:"totalMarginBalance"` TotalAvailableBalance string `json:"totalAvailableBalance"` TotalPerpUPL string `json:"totalPerpUPL"` TotalInitialMargin string `json:"totalInitialMargin"` TotalMaintenanceMargin string `json:"totalMaintenanceMargin"` AccountType AccountType `json:"accountType"` Coins []WebsocketPrivateWalletCoin `json:"coin"` }
type WebsocketPrivateWalletResponse ¶
type WebsocketPrivateWalletResponse struct { ID string `json:"id"` Topic WebsocketPrivateTopic `json:"topic"` CreationTime int64 `json:"creationTime"` Data []WebsocketPrivateWalletData `json:"data"` }
type WebsocketPublicOrderBookAsks ¶
type WebsocketPublicOrderBookAsks []struct { Price string `json:"price"` Size string `json:"size"` }
func (*WebsocketPublicOrderBookAsks) UnmarshalJSON ¶
func (b *WebsocketPublicOrderBookAsks) UnmarshalJSON(data []byte) error
type WebsocketPublicOrderBookBids ¶
type WebsocketPublicOrderBookBids []struct { Price string `json:"price"` Size string `json:"size"` }
func (*WebsocketPublicOrderBookBids) UnmarshalJSON ¶
func (b *WebsocketPublicOrderBookBids) UnmarshalJSON(data []byte) error
type WebsocketPublicOrderBookData ¶
type WebsocketPublicOrderBookData struct { Symbol string `json:"s"` Bids WebsocketPublicOrderBookBids `json:"b"` Asks WebsocketPublicOrderBookAsks `json:"a"` UpdateID int `json:"u"` Seq int `json:"seq"` }
type WebsocketPublicOrderBookResponse ¶
type WebsocketPublicOrderBookResponse struct { Topic string `json:"topic"` Type string `json:"type"` TimeStamp int64 `json:"ts"` Data WebsocketPublicOrderBookData `json:"data"` }
type WithdrawStatusV5 ¶
type WithdrawStatusV5 string
type WithdrawTypeV5 ¶
type WithdrawTypeV5 int
Click to show internal directories.
Click to hide internal directories.