Versions in this module Expand all Collapse all v2 v2.0.0 Nov 10, 2023 Changes in this version + const MarginTypeCrossed + const MarginTypeIsolated + const NewOrderRespTypeACK + const NewOrderRespTypeFULL + const NewOrderRespTypeRESULT + const OrderExecutionTypeCalculated + const OrderExecutionTypeCanceled + const OrderExecutionTypeExpired + const OrderExecutionTypeFill + const OrderExecutionTypeNew + const OrderExecutionTypePartialFill + const OrderExecutionTypeTrade + const OrderStatusTypeCanceled + const OrderStatusTypeExpired + const OrderStatusTypeFilled + const OrderStatusTypeNew + const OrderStatusTypePartiallyFilled + const OrderStatusTypeRejected + const OrderTypeLimit + const OrderTypeMarket + const OrderTypeStop + const OrderTypeStopMarket + const OrderTypeTakeProfit + const OrderTypeTakeProfitMarket + const OrderTypeTrailingStopMarket + const PositionSideTypeBoth + const PositionSideTypeLong + const PositionSideTypeShort + const SideEffectTypeAutoRepay + const SideEffectTypeMarginBuy + const SideEffectTypeNoSideEffect + const SideTypeBuy + const SideTypeSell + const SymbolFilterTypeLotSize + const SymbolFilterTypeMarketLotSize + const SymbolFilterTypeMaxNumOrders + const SymbolFilterTypePercentPrice + const SymbolFilterTypePrice + const SymbolStatusTypeAuctionMatch + const SymbolStatusTypeBreak + const SymbolStatusTypeEndOfDay + const SymbolStatusTypeHalt + const SymbolStatusTypePostTrading + const SymbolStatusTypePreTrading + const SymbolStatusTypeTrading + const SymbolTypeFuture + const TimeInForceTypeFOK + const TimeInForceTypeGTC + const TimeInForceTypeGTX + const TimeInForceTypeIOC + const UserDataEventReasonTypeAdjustment + const UserDataEventReasonTypeAdminDeposit + const UserDataEventReasonTypeAdminWithdraw + const UserDataEventReasonTypeAssetTransfer + const UserDataEventReasonTypeDeposit + const UserDataEventReasonTypeFundingFee + const UserDataEventReasonTypeInsuranceClear + const UserDataEventReasonTypeMarginTransfer + const UserDataEventReasonTypeMarginTypeChange + const UserDataEventReasonTypeOptionsPremiumFee + const UserDataEventReasonTypeOptionsSettleProfit + const UserDataEventReasonTypeOrder + const UserDataEventReasonTypeWithdraw + const UserDataEventReasonTypeWithdrawReject + const UserDataEventTypeAccountConfigUpdate + const UserDataEventTypeAccountUpdate + const UserDataEventTypeListenKeyExpired + const UserDataEventTypeMarginCall + const UserDataEventTypeOrderTradeUpdate + const WorkingTypeContractPrice + const WorkingTypeMarkPrice + var UseTestnet = false + var WebsocketKeepalive = false + var WebsocketTimeout = time.Second * 60 + func WsAggTradeServe(symbol string, handler WsAggTradeHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsAllBookTickerServe(handler WsBookTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsAllLiquidationOrderServe(handler WsLiquidationOrderHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsAllMarketTickerServe(handler WsAllMarketTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsAllMiniMarketTickerServe(handler WsAllMiniMarketTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsBookTickerServe(symbol string, handler WsBookTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsContinuousKlineServe(pair string, contractType string, interval string, ...) (doneC, stopC chan struct{}, err error) + func WsDiffDepthServe(symbol string, handler WsDepthHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsDiffDepthServeWithRate(symbol string, rate *time.Duration, handler WsDepthHandler, ...) (doneC, stopC chan struct{}, err error) + func WsIndexPriceKlineServe(pair string, interval string, handler WsIndexPriceKlineHandler, ...) (doneC, stopC chan struct{}, err error) + func WsIndexPriceServe(symbol string, handler WsIndexPriceHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsKlineServe(symbol string, interval string, handler WsKlineHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsLiquidationOrderServe(symbol string, handler WsLiquidationOrderHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsMarkPriceKlineServe(symbol string, interval string, handler WsMarkPriceKlineHandler, ...) (doneC, stopC chan struct{}, err error) + func WsMarkPriceServe(symbol string, handler WsMarkPriceHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsMarketTickerServe(symbol string, handler WsMarketTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsMiniMarketTickerServe(symbol string, handler WsMiniMarketTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsPairMarkPriceServe(handler WsPairMarkPriceHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsPartialDepthServe(symbol string, levels int, handler WsDepthHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsPartialDepthServeWithRate(symbol string, levels int, rate *time.Duration, handler WsDepthHandler, ...) (doneC, stopC chan struct{}, err error) + func WsUserDataServe(listenKey string, handler WsUserDataHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + type Account struct + Assets []*AccountAsset + CanDeposit bool + CanTrade bool + CanWithdraw bool + FeeTier int + Positions []*AccountPosition + UpdateTime int64 + type AccountAsset struct + Asset string + AvailableBalance string + CrossUnPnl string + CrossWalletBalance string + InitialMargin string + MaintMargin string + MarginBalance string + MaxWithdrawAmount string + OpenOrderInitialMargin string + PositionInitialMargin string + UnrealizedProfit string + WalletBalance string + type AccountPosition struct + EntryPrice string + InitialMargin string + Isolated bool + Leverage string + MaintMargin string + MaxQty string + OpenOrderInitialMargin string + PositionAmt string + PositionInitialMargin string + PositionSide string + Symbol string + UnrealizedProfit string + type Ask = common.PriceLevel + type Balance struct + AccountAlias string + Asset string + AvailableBalance string + Balance string + CrossUnPnl string + CrossWalletBalance string + UpdateTime int64 + WithdrawAvailable string + type Bid = common.PriceLevel + type BookTicker struct + AskPrice string + AskQuantity string + BidPrice string + BidQuantity string + Pair string + Symbol string + type CancelAllOpenOrdersService struct + func (s *CancelAllOpenOrdersService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *CancelAllOpenOrdersService) Symbol(symbol string) *CancelAllOpenOrdersService + type CancelOrderResponse struct + ActivatePrice string + AvgPrice string + ClientOrderID string + ClosePosition bool + CumBase string + CumQuantity string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + OrigType OrderType + Pair string + PositionSide PositionSideType + Price string + PriceProtect bool + PriceRate string + ReduceOnly bool + Side SideType + Status OrderStatusType + StopPrice string + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + WorkingType WorkingType + type CancelOrderService struct + func (s *CancelOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CancelOrderResponse, err error) + func (s *CancelOrderService) OrderID(orderID int64) *CancelOrderService + func (s *CancelOrderService) OrigClientOrderID(origClientOrderID string) *CancelOrderService + func (s *CancelOrderService) Symbol(symbol string) *CancelOrderService + type ChangeLeverageService struct + func (s *ChangeLeverageService) Do(ctx context.Context, opts ...RequestOption) (res *SymbolLeverage, err error) + func (s *ChangeLeverageService) Leverage(leverage int) *ChangeLeverageService + func (s *ChangeLeverageService) Symbol(symbol string) *ChangeLeverageService + type ChangeMarginTypeService struct + func (s *ChangeMarginTypeService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *ChangeMarginTypeService) MarginType(marginType MarginType) *ChangeMarginTypeService + func (s *ChangeMarginTypeService) Symbol(symbol string) *ChangeMarginTypeService + type ChangePositionModeService struct + func (s *ChangePositionModeService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *ChangePositionModeService) DualSide(dualSide bool) *ChangePositionModeService + type Client struct + APIKey string + BaseURL string + Debug bool + HTTPClient *http.Client + Logger *log.Logger + SecretKey string + TimeOffset int64 + UserAgent string + func NewClient(apiKey, secretKey string) *Client + func (c *Client) NewCancelAllOpenOrdersService() *CancelAllOpenOrdersService + func (c *Client) NewCancelOrderService() *CancelOrderService + func (c *Client) NewChangeLeverageService() *ChangeLeverageService + func (c *Client) NewChangeMarginTypeService() *ChangeMarginTypeService + func (c *Client) NewChangePositionModeService() *ChangePositionModeService + func (c *Client) NewCloseUserStreamService() *CloseUserStreamService + func (c *Client) NewCreateOrderService() *CreateOrderService + func (c *Client) NewExchangeInfoService() *ExchangeInfoService + func (c *Client) NewGetAccountService() *GetAccountService + func (c *Client) NewGetBalanceService() *GetBalanceService + func (c *Client) NewGetOrderService() *GetOrderService + func (c *Client) NewGetPositionModeService() *GetPositionModeService + func (c *Client) NewGetPositionRiskService() *GetPositionRiskService + func (c *Client) NewKeepaliveUserStreamService() *KeepaliveUserStreamService + func (c *Client) NewKlinesService() *KlinesService + func (c *Client) NewListBookTickersService() *ListBookTickersService + func (c *Client) NewListLiquidationOrdersService() *ListLiquidationOrdersService + func (c *Client) NewListOpenOrdersService() *ListOpenOrdersService + func (c *Client) NewListOrdersService() *ListOrdersService + func (c *Client) NewListPriceChangeStatsService() *ListPriceChangeStatsService + func (c *Client) NewListPricesService() *ListPricesService + func (c *Client) NewPingService() *PingService + func (c *Client) NewServerTimeService() *ServerTimeService + func (c *Client) NewSetServerTimeService() *SetServerTimeService + func (c *Client) NewStartUserStreamService() *StartUserStreamService + func (c *Client) NewUpdatePositionMarginService() *UpdatePositionMarginService + func (c *Client) SetApiEndpoint(url string) *Client + type CloseUserStreamService struct + func (s *CloseUserStreamService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *CloseUserStreamService) ListenKey(listenKey string) *CloseUserStreamService + type CreateOrderResponse struct + ActivatePrice string + AvgPrice string + ClientOrderID string + ClosePosition bool + CumBase string + CumQuantity string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + OrigType OrderType + Pair string + PositionSide PositionSideType + Price string + PriceProtect bool + PriceRate string + ReduceOnly bool + Side SideType + Status OrderStatusType + StopPrice string + Symbol string + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + WorkingType WorkingType + type CreateOrderService struct + func (s *CreateOrderService) ActivationPrice(activationPrice string) *CreateOrderService + func (s *CreateOrderService) CallbackRate(callbackRate string) *CreateOrderService + func (s *CreateOrderService) ClosePosition(closePosition bool) *CreateOrderService + func (s *CreateOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CreateOrderResponse, err error) + func (s *CreateOrderService) NewClientOrderID(newClientOrderID string) *CreateOrderService + func (s *CreateOrderService) NewOrderResponseType(newOrderResponseType NewOrderRespType) *CreateOrderService + func (s *CreateOrderService) PositionSide(positionSide PositionSideType) *CreateOrderService + func (s *CreateOrderService) Price(price string) *CreateOrderService + func (s *CreateOrderService) PriceProtect(priceProtect bool) *CreateOrderService + func (s *CreateOrderService) Quantity(quantity string) *CreateOrderService + func (s *CreateOrderService) ReduceOnly(reduceOnly bool) *CreateOrderService + func (s *CreateOrderService) Side(side SideType) *CreateOrderService + func (s *CreateOrderService) StopPrice(stopPrice string) *CreateOrderService + func (s *CreateOrderService) Symbol(symbol string) *CreateOrderService + func (s *CreateOrderService) TimeInForce(timeInForce TimeInForceType) *CreateOrderService + func (s *CreateOrderService) Type(orderType OrderType) *CreateOrderService + func (s *CreateOrderService) WorkingType(workingType WorkingType) *CreateOrderService + type ErrHandler func(err error) + type ExchangeInfo struct + ExchangeFilters []interface{} + RateLimits []RateLimit + ServerTime int64 + Symbols []Symbol + Timezone string + type ExchangeInfoService struct + func (s *ExchangeInfoService) Do(ctx context.Context, opts ...RequestOption) (res *ExchangeInfo, err error) + type GetAccountService struct + func (s *GetAccountService) Do(ctx context.Context, opts ...RequestOption) (res *Account, err error) + type GetBalanceService struct + func (s *GetBalanceService) Do(ctx context.Context, opts ...RequestOption) (res []*Balance, err error) + type GetOrderService struct + func (s *GetOrderService) Do(ctx context.Context, opts ...RequestOption) (res *Order, err error) + func (s *GetOrderService) OrderID(orderID int64) *GetOrderService + func (s *GetOrderService) OrigClientOrderID(origClientOrderID string) *GetOrderService + func (s *GetOrderService) Symbol(symbol string) *GetOrderService + type GetPositionModeService struct + func (s *GetPositionModeService) Do(ctx context.Context, opts ...RequestOption) (res *PositionMode, err error) + type GetPositionRiskService struct + func (s *GetPositionRiskService) Do(ctx context.Context, opts ...RequestOption) (res []*PositionRisk, err error) + func (s *GetPositionRiskService) MarginAsset(marginAsset string) *GetPositionRiskService + func (s *GetPositionRiskService) Pair(pair string) *GetPositionRiskService + type KeepaliveUserStreamService struct + func (s *KeepaliveUserStreamService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *KeepaliveUserStreamService) ListenKey(listenKey string) *KeepaliveUserStreamService + type Kline struct + Close string + CloseTime int64 + High string + Low string + Open string + OpenTime int64 + QuoteAssetVolume string + TakerBuyBaseAssetVolume string + TakerBuyQuoteAssetVolume string + TradeNum int64 + Volume string + type KlinesService struct + func (s *KlinesService) Do(ctx context.Context, opts ...RequestOption) (res []*Kline, err error) + func (s *KlinesService) EndTime(endTime int64) *KlinesService + func (s *KlinesService) Interval(interval string) *KlinesService + func (s *KlinesService) Limit(limit int) *KlinesService + func (s *KlinesService) StartTime(startTime int64) *KlinesService + func (s *KlinesService) Symbol(symbol string) *KlinesService + type LiquidationOrder struct + AveragePrice string + ExecutedQuantity string + OrigQuantity string + Price string + Side SideType + Status OrderStatusType + Symbol string + Time int64 + TimeInForce TimeInForceType + Type OrderType + type ListBookTickersService struct + func (s *ListBookTickersService) Do(ctx context.Context, opts ...RequestOption) (res []*BookTicker, err error) + func (s *ListBookTickersService) Pair(pair string) *ListBookTickersService + func (s *ListBookTickersService) Symbol(symbol string) *ListBookTickersService + type ListLiquidationOrdersService struct + func (s *ListLiquidationOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*LiquidationOrder, err error) + func (s *ListLiquidationOrdersService) EndTime(endTime int64) *ListLiquidationOrdersService + func (s *ListLiquidationOrdersService) Limit(limit int) *ListLiquidationOrdersService + func (s *ListLiquidationOrdersService) Pair(pair string) *ListLiquidationOrdersService + func (s *ListLiquidationOrdersService) StartTime(startTime int64) *ListLiquidationOrdersService + func (s *ListLiquidationOrdersService) Symbol(symbol string) *ListLiquidationOrdersService + type ListOpenOrdersService struct + func (s *ListOpenOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*Order, err error) + func (s *ListOpenOrdersService) Pair(pair string) *ListOpenOrdersService + func (s *ListOpenOrdersService) Symbol(symbol string) *ListOpenOrdersService + type ListOrdersService struct + func (s *ListOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*Order, err error) + func (s *ListOrdersService) EndTime(endTime int64) *ListOrdersService + func (s *ListOrdersService) Limit(limit int) *ListOrdersService + func (s *ListOrdersService) OrderID(orderID int64) *ListOrdersService + func (s *ListOrdersService) Pair(pair string) *ListOrdersService + func (s *ListOrdersService) StartTime(startTime int64) *ListOrdersService + func (s *ListOrdersService) Symbol(symbol string) *ListOrdersService + type ListPriceChangeStatsService struct + func (s *ListPriceChangeStatsService) Do(ctx context.Context, opts ...RequestOption) (res []*PriceChangeStats, err error) + func (s *ListPriceChangeStatsService) Pair(pair string) *ListPriceChangeStatsService + func (s *ListPriceChangeStatsService) Symbol(symbol string) *ListPriceChangeStatsService + type ListPricesService struct + func (s *ListPricesService) Do(ctx context.Context, opts ...RequestOption) (res []*SymbolPrice, err error) + func (s *ListPricesService) Pair(pair string) *ListPricesService + func (s *ListPricesService) Symbol(symbol string) *ListPricesService + type LotSizeFilter struct + MaxQuantity string + MinQuantity string + StepSize string + type MarginType string + type MarketLotSizeFilter struct + MaxQuantity string + MinQuantity string + StepSize string + type MaxNumOrdersFilter struct + Limit int64 + type NewOrderRespType string + type Order struct + ActivatePrice string + AvgPrice string + ClientOrderID string + ClosePosition bool + CumBase string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + OrigType OrderType + Pair string + PositionSide PositionSideType + Price string + PriceProtect bool + PriceRate string + ReduceOnly bool + Side SideType + Status OrderStatusType + StopPrice string + Symbol string + Time int64 + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + WorkingType WorkingType + type OrderExecutionType string + type OrderStatusType string + type OrderType string + type PercentPriceFilter struct + MultiplierDecimal int + MultiplierDown string + MultiplierUp string + type PingService struct + func (s *PingService) Do(ctx context.Context, opts ...RequestOption) (err error) + type PositionMode struct + DualSidePosition bool + type PositionRisk struct + EntryPrice string + IsAutoAddMargin string + IsolatedMargin string + Leverage string + LiquidationPrice string + MarginType string + MarkPrice string + MaxQuantity string + PositionAmt string + PositionSide string + Symbol string + UnRealizedProfit string + type PositionSideType string + type PriceChangeStats struct + BaseVolume string + CloseTime int64 + Count int64 + FirstID int64 + HighPrice string + LastID int64 + LastPrice string + LastQuantity string + LowPrice string + OpenPrice string + OpenTime int64 + Pair string + PriceChange string + PriceChangePercent string + Symbol string + Volume string + WeightedAvgPrice string + type PriceFilter struct + MaxPrice string + MinPrice string + TickSize string + type RateLimit struct + Interval string + IntervalNum int64 + Limit int64 + RateLimitType string + type RequestOption func(*request) + func WithHeader(key, value string, replace bool) RequestOption + func WithHeaders(header http.Header) RequestOption + func WithRecvWindow(recvWindow int64) RequestOption + type ServerTimeService struct + func (s *ServerTimeService) Do(ctx context.Context, opts ...RequestOption) (serverTime int64, err error) + type SetServerTimeService struct + func (s *SetServerTimeService) Do(ctx context.Context, opts ...RequestOption) (timeOffset int64, err error) + type SideEffectType string + type SideType string + type StartUserStreamService struct + func (s *StartUserStreamService) Do(ctx context.Context, opts ...RequestOption) (listenKey string, err error) + type Symbol struct + BaseAsset string + BaseAssetPrecision int + ContractSize int + ContractStatus string + ContractType string + DeliveryDate int64 + EqualQtyPrecision int + Filters []map[string]interface{} + MaintMarginPercent string + MarginAsset string + OnboardDate int64 + OrderType []OrderType + Pair string + PricePrecision int + QuantityPrecision int + QuoteAsset string + QuotePrecision int + RequiredMarginPercent string + Symbol string + TimeInForce []TimeInForceType + TriggerProtect string + UnderlyingSubType []interface{} + UnderlyingType string + func (s *Symbol) LotSizeFilter() *LotSizeFilter + func (s *Symbol) MarketLotSizeFilter() *MarketLotSizeFilter + func (s *Symbol) MaxNumOrdersFilter() *MaxNumOrdersFilter + func (s *Symbol) PercentPriceFilter() *PercentPriceFilter + func (s *Symbol) PriceFilter() *PriceFilter + type SymbolFilterType string + type SymbolLeverage struct + Leverage int + MaxQuantity string + Symbol string + type SymbolPrice struct + Pair string + Price string + Symbol string + type SymbolStatusType string + type SymbolType string + type TimeInForceType string + type UpdatePositionMarginService struct + func (s *UpdatePositionMarginService) Amount(amount string) *UpdatePositionMarginService + func (s *UpdatePositionMarginService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *UpdatePositionMarginService) PositionSide(positionSide PositionSideType) *UpdatePositionMarginService + func (s *UpdatePositionMarginService) Symbol(symbol string) *UpdatePositionMarginService + func (s *UpdatePositionMarginService) Type(actionType int) *UpdatePositionMarginService + type UserDataEventReasonType string + type UserDataEventType string + type WorkingType string + type WsAccountConfigUpdate struct + Leverage int64 + Symbol string + type WsAccountUpdate struct + Balances []WsBalance + Positions []WsPosition + Reason UserDataEventReasonType + type WsAggTradeEvent struct + AggregateTradeID int64 + Event string + FirstTradeID int64 + LastTradeID int64 + Maker bool + Price string + Quantity string + Symbol string + Time int64 + TradeTime int64 + type WsAggTradeHandler func(event *WsAggTradeEvent) + type WsAllMarketTickerEvent []*WsMarketTickerEvent + type WsAllMarketTickerHandler func(event WsAllMarketTickerEvent) + type WsAllMiniMarketTickerEvent []*WsMiniMarketTickerEvent + type WsAllMiniMarketTickerHandler func(event WsAllMiniMarketTickerEvent) + type WsBalance struct + Asset string + Balance string + BalanceChange string + CrossWalletBalance string + type WsBookTickerEvent struct + BestAskPrice string + BestAskQty string + BestBidPrice string + BestBidQty string + Event string + Pair string + Symbol string + Time int64 + TransactionTime int64 + UpdateID int64 + type WsBookTickerHandler func(event *WsBookTickerEvent) + type WsConfig struct + Endpoint string + type WsContinuousKline struct + ActiveBuyQuoteVolume string + ActiveBuyVolume string + Close string + EndTime int64 + FirstTradeID int64 + High string + Interval string + IsFinal bool + LastTradeID int64 + Low string + Open string + QuoteVolume string + StartTime int64 + TradeNum int64 + Volume string + type WsContinuousKlineEvent struct + ContractType string + Event string + Kline WsContinuousKline + Pair string + Time int64 + type WsContinuousKlineHandler func(event *WsContinuousKlineEvent) + type WsDepthEvent struct + Asks []Ask + Bids []Bid + Event string + FirstUpdateID int64 + LastUpdateID int64 + Pair string + PrevLastUpdateID int64 + Symbol string + Time int64 + TransactionTime int64 + type WsDepthHandler func(event *WsDepthEvent) + type WsHandler func(message []byte) + type WsIndexPriceEvent struct + Event string + IndexPrice string + Pair string + Time int64 + type WsIndexPriceHandler func(event *WsIndexPriceEvent) + type WsIndexPriceKline struct + Close string + EndTime int64 + High string + Interval string + IsFinal bool + LastTradeId int64 + Low string + Open string + StartTime int64 + TradeNum int64 + type WsIndexPriceKlineEvent struct + Event string + Kline WsIndexPriceKline + Pair string + Time int64 + type WsIndexPriceKlineHandler func(event *WsIndexPriceKlineEvent) + type WsKline struct + ActiveBuyQuoteVolume string + ActiveBuyVolume string + Close string + EndTime int64 + FirstTradeID int64 + High string + Interval string + IsFinal bool + LastTradeID int64 + Low string + Open string + QuoteVolume string + StartTime int64 + Symbol string + TradeNum int64 + Volume string + type WsKlineEvent struct + Event string + Kline WsKline + Symbol string + Time int64 + type WsKlineHandler func(event *WsKlineEvent) + type WsLiquidationOrder struct + AccumulatedFilledQty string + AvgPrice string + LastFilledQty string + OrderStatus OrderStatusType + OrderType OrderType + OrigQuantity string + Pair string + Price string + Side SideType + Symbol string + TimeInForce TimeInForceType + TradeTime int64 + type WsLiquidationOrderEvent struct + Event string + LiquidationOrder WsLiquidationOrder + Time int64 + type WsLiquidationOrderHandler func(event *WsLiquidationOrderEvent) + type WsMarkPriceEvent struct + EstimatedSettlePrice string + Event string + FundingRate string + MarkPrice string + NextFundingTime int64 + Symbol string + Time int64 + type WsMarkPriceHandler func(event *WsMarkPriceEvent) + type WsMarkPriceKline struct + Close string + EndTime int64 + High string + Interval string + IsFinal bool + LastTradeID int64 + Low string + Open string + StartTime int64 + Symbol string + TradeNum int64 + type WsMarkPriceKlineEvent struct + Event string + Kline WsMarkPriceKline + Pair string + Time int64 + type WsMarkPriceKlineHandler func(event *WsMarkPriceKlineEvent) + type WsMarketTickerEvent struct + BaseVolume string + ClosePrice string + CloseQty string + CloseTime int64 + Event string + FirstID int64 + HighPrice string + LastID int64 + LowPrice string + OpenPrice string + OpenTime int64 + Pair string + PriceChange string + PriceChangePercent string + QuoteVolume string + Symbol string + Time int64 + TradeCount int64 + WeightedAvgPrice string + type WsMarketTickerHandler func(event *WsMarketTickerEvent) + type WsMiniMarketTickerEvent struct + ClosePrice string + Event string + HighPrice string + LowPrice string + OpenPrice string + Pair string + QuoteVolume string + Symbol string + Time int64 + Volume string + type WsMiniMarketTickerHandler func(event *WsMiniMarketTickerEvent) + type WsOrderTradeUpdate struct + AccumulatedFilledQty string + ActivationPrice string + AsksNotional string + AveragePrice string + BidsNotional string + CallbackRate string + ClientOrderID string + Commission string + CommissionAsset string + ExecutionType OrderExecutionType + ID int64 + IsClosingPosition bool + IsMaker bool + IsProtected bool + IsReduceOnly bool + LastFilledPrice string + LastFilledQty string + MarginAsset string + OriginalPrice string + OriginalQty string + OriginalType OrderType + PositionSide PositionSideType + RealizedPnL string + Side SideType + Status OrderStatusType + StopPrice string + Symbol string + TimeInForce TimeInForceType + TradeID int64 + TradeTime int64 + Type OrderType + WorkingType WorkingType + type WsPairMarkPriceEvent []*WsMarkPriceEvent + type WsPairMarkPriceHandler func(event WsPairMarkPriceEvent) + type WsPosition struct + AccumulatedRealized string + Amount string + EntryPrice string + IsolatedWallet string + MaintenanceMarginRequired string + MarginType MarginType + MarkPrice string + Side PositionSideType + Symbol string + UnrealizedPnL string + type WsUserDataEvent struct + AccountUpdate WsAccountUpdate + Alias string + CrossWalletBalance string + Event UserDataEventType + MarginCallPositions []WsPosition + OrderTradeUpdate WsOrderTradeUpdate + Time int64 + TransactionTime int64 + type WsUserDataHandler func(event *WsUserDataEvent)