Versions in this module Expand all Collapse all v2 v2.3.9 Oct 24, 2022 v2.3.8 Oct 24, 2022 v2.3.7 Nov 18, 2021 v2.3.6 Nov 18, 2021 v2.3.5 Nov 18, 2021 Changes in this version + const ContractTypePerpetual + const ForceOrderCloseTypeADL + const ForceOrderCloseTypeLiquidation + const MarginTypeCrossed + const MarginTypeIsolated + const NewOrderRespTypeACK + 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 OrderStatusTypeNewADL + const OrderStatusTypeNewInsurance + 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 SymbolFilterTypeMaxNumAlgoOrders + const SymbolFilterTypeMaxNumOrders + const SymbolFilterTypeMinNotional + 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 WsAllMarkPriceServe(handler WsAllMarkPriceHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsAllMarkPriceServeWithRate(rate time.Duration, handler WsAllMarkPriceHandler, 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 WsBLVTInfoServe(name string, handler WsBLVTInfoHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsBLVTKlineServe(name string, interval string, handler WsBLVTKlineHandler, ...) (doneC, stopC chan struct{}, err error) + func WsBookTickerServe(symbol string, handler WsBookTickerHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsCombinedAggTradeServe(symbols []string, handler WsAggTradeHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsCombinedDepthServe(symbolLevels map[string]string, handler WsDepthHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsCombinedDiffDepthServe(symbols []string, handler WsDepthHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsCombinedKlineServe(symbolIntervalPair map[string]string, handler WsKlineHandler, ...) (doneC, stopC chan struct{}, err error) + func WsCompositiveIndexServe(symbol string, handler WsCompositeIndexHandler, errHandler ErrHandler) (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 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 WsMarkPriceServe(symbol string, handler WsMarkPriceHandler, errHandler ErrHandler) (doneC, stopC chan struct{}, err error) + func WsMarkPriceServeWithRate(symbol string, rate time.Duration, handler WsMarkPriceHandler, ...) (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 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 + MaxWithdrawAmount string + Positions []*AccountPosition + TotalInitialMargin string + TotalMaintMargin string + TotalMarginBalance string + TotalOpenOrderInitialMargin string + TotalPositionInitialMargin string + TotalUnrealizedProfit string + TotalWalletBalance string + UpdateTime int64 + type AccountAsset struct + Asset 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 + IsolatedWallet string + Leverage string + MaintMargin string + MaxNotional string + Notional string + OpenOrderInitialMargin string + PositionAmt string + PositionInitialMargin string + PositionSide PositionSideType + Symbol string + UnrealizedProfit string + UpdateTime int64 + type AccountTrade struct + Buyer bool + Commission string + CommissionAsset string + ID int64 + Maker bool + OrderID int64 + PositionSide PositionSideType + Price string + Quantity string + QuoteQuantity string + RealizedPnl string + Side SideType + Symbol string + Time int64 + type AggTrade struct + AggTradeID int64 + FirstTradeID int64 + IsBuyerMaker bool + LastTradeID int64 + Price string + Quantity string + Timestamp int64 + type AggTradesService struct + func (s *AggTradesService) Do(ctx context.Context, opts ...RequestOption) (res []*AggTrade, err error) + func (s *AggTradesService) EndTime(endTime int64) *AggTradesService + func (s *AggTradesService) FromID(fromID int64) *AggTradesService + func (s *AggTradesService) Limit(limit int) *AggTradesService + func (s *AggTradesService) StartTime(startTime int64) *AggTradesService + func (s *AggTradesService) Symbol(symbol string) *AggTradesService + type Ask = common.PriceLevel + type Balance struct + AccountAlias string + Asset string + AvailableBalance string + Balance string + CrossUnPnl string + CrossWalletBalance string + MaxWithdrawAmount string + type Bid = common.PriceLevel + type BookTicker struct + AskPrice string + AskQuantity string + BidPrice string + BidQuantity string + Symbol string + type Bracket struct + Bracket int + Cum float64 + InitialLeverage int + MaintMarginRatio float64 + NotionalCap float64 + NotionalFloor float64 + type CancelAllOpenOrdersService struct + func (s *CancelAllOpenOrdersService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *CancelAllOpenOrdersService) Symbol(symbol string) *CancelAllOpenOrdersService + type CancelMultiplesOrdersService struct + func (s *CancelMultiplesOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*CancelOrderResponse, err error) + func (s *CancelMultiplesOrdersService) OrderIDList(orderIDList []int64) *CancelMultiplesOrdersService + func (s *CancelMultiplesOrdersService) OrigClientOrderIDList(origClientOrderIDList []string) *CancelMultiplesOrdersService + func (s *CancelMultiplesOrdersService) Symbol(symbol string) *CancelMultiplesOrdersService + type CancelOrderResponse struct + ActivatePrice string + ClientOrderID string + CumQuantity string + CumQuote string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + OrigType 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) NewAggTradesService() *AggTradesService + func (c *Client) NewCancelAllOpenOrdersService() *CancelAllOpenOrdersService + func (c *Client) NewCancelMultipleOrdersService() *CancelMultiplesOrdersService + 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) NewCreateBatchOrdersService() *CreateBatchOrdersService + func (c *Client) NewCreateOrderService() *CreateOrderService + func (c *Client) NewDepthService() *DepthService + func (c *Client) NewExchangeInfoService() *ExchangeInfoService + func (c *Client) NewFundingRateService() *FundingRateService + func (c *Client) NewGetAccountService() *GetAccountService + func (c *Client) NewGetBalanceService() *GetBalanceService + func (c *Client) NewGetIncomeHistoryService() *GetIncomeHistoryService + func (c *Client) NewGetLeverageBracketService() *GetLeverageBracketService + func (c *Client) NewGetOrderService() *GetOrderService + func (c *Client) NewGetPositionMarginHistoryService() *GetPositionMarginHistoryService + func (c *Client) NewGetPositionModeService() *GetPositionModeService + func (c *Client) NewGetPositionRiskService() *GetPositionRiskService + func (c *Client) NewGetRebateNewUserService() *GetRebateNewUserService + func (c *Client) NewHistoricalTradesService() *HistoricalTradesService + func (c *Client) NewKeepaliveUserStreamService() *KeepaliveUserStreamService + func (c *Client) NewKlinesService() *KlinesService + func (c *Client) NewListAccountTradeService() *ListAccountTradeService + 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) NewListUserLiquidationOrdersService() *ListUserLiquidationOrdersService + func (c *Client) NewPingService() *PingService + func (c *Client) NewPremiumIndexService() *PremiumIndexService + func (c *Client) NewRecentTradesService() *RecentTradesService + func (c *Client) NewServerTimeService() *ServerTimeService + func (c *Client) NewSetServerTimeService() *SetServerTimeService + func (c *Client) NewStartUserStreamService() *StartUserStreamService + func (c *Client) NewUpdatePositionMarginService() *UpdatePositionMarginService + type CloseUserStreamService struct + func (s *CloseUserStreamService) Do(ctx context.Context, opts ...RequestOption) (err error) + func (s *CloseUserStreamService) ListenKey(listenKey string) *CloseUserStreamService + type ContractType string + type CreateBatchOrdersResponse struct + Orders []*Order + type CreateBatchOrdersService struct + func (s *CreateBatchOrdersService) Do(ctx context.Context, opts ...RequestOption) (res *CreateBatchOrdersResponse, err error) + func (s *CreateBatchOrdersService) OrderList(orders []*CreateOrderService) *CreateBatchOrdersService + type CreateOrderResponse struct + ActivatePrice string + AvgPrice string + ClientOrderID string + ClosePosition bool + CumQuote string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + PositionSide PositionSideType + Price string + PriceProtect bool + PriceRate string + RateLimitOrder10s string + RateLimitOrder1m 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 DepthResponse struct + Asks []Ask + Bids []Bid + LastUpdateID int64 + Time int64 + TradeTime int64 + type DepthService struct + func (s *DepthService) Do(ctx context.Context, opts ...RequestOption) (res *DepthResponse, err error) + func (s *DepthService) Limit(limit int) *DepthService + func (s *DepthService) Symbol(symbol string) *DepthService + 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 ForceOrderCloseType string + type FundingRate struct + FundingRate string + FundingTime int64 + Symbol string + Time int64 + type FundingRateService struct + func (s *FundingRateService) Do(ctx context.Context, opts ...RequestOption) (res []*FundingRate, err error) + func (s *FundingRateService) EndTime(endTime int64) *FundingRateService + func (s *FundingRateService) Limit(limit int) *FundingRateService + func (s *FundingRateService) StartTime(startTime int64) *FundingRateService + func (s *FundingRateService) Symbol(symbol string) *FundingRateService + 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 GetIncomeHistoryService struct + func (s *GetIncomeHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*IncomeHistory, err error) + func (s *GetIncomeHistoryService) EndTime(endTime int64) *GetIncomeHistoryService + func (s *GetIncomeHistoryService) IncomeType(incomeType string) *GetIncomeHistoryService + func (s *GetIncomeHistoryService) Limit(limit int64) *GetIncomeHistoryService + func (s *GetIncomeHistoryService) StartTime(startTime int64) *GetIncomeHistoryService + func (s *GetIncomeHistoryService) Symbol(symbol string) *GetIncomeHistoryService + type GetLeverageBracketService struct + func (s *GetLeverageBracketService) Do(ctx context.Context, opts ...RequestOption) (res []*LeverageBracket, err error) + func (s *GetLeverageBracketService) Symbol(symbol string) *GetLeverageBracketService + 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 GetPositionMarginHistoryService struct + func (s *GetPositionMarginHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*PositionMarginHistory, err error) + func (s *GetPositionMarginHistoryService) EndTime(endTime int64) *GetPositionMarginHistoryService + func (s *GetPositionMarginHistoryService) Limit(limit int64) *GetPositionMarginHistoryService + func (s *GetPositionMarginHistoryService) StartTime(startTime int64) *GetPositionMarginHistoryService + func (s *GetPositionMarginHistoryService) Symbol(symbol string) *GetPositionMarginHistoryService + func (s *GetPositionMarginHistoryService) Type(_type int) *GetPositionMarginHistoryService + 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) Symbol(symbol string) *GetPositionRiskService + type GetRebateNewUserService struct + func (s *GetRebateNewUserService) BrokerageID(brokerageID string) *GetRebateNewUserService + func (s *GetRebateNewUserService) Do(ctx context.Context, opts ...RequestOption) (res *RebateNewUser, err error) + func (s *GetRebateNewUserService) Type(type_future int) *GetRebateNewUserService + type HistoricalTradesService struct + func (s *HistoricalTradesService) Do(ctx context.Context, opts ...RequestOption) (res []*Trade, err error) + func (s *HistoricalTradesService) FromID(fromID int64) *HistoricalTradesService + func (s *HistoricalTradesService) Limit(limit int) *HistoricalTradesService + func (s *HistoricalTradesService) Symbol(symbol string) *HistoricalTradesService + type IncomeHistory struct + Asset string + Income string + IncomeType string + Info string + Symbol string + Time int64 + TradeID string + TranID int64 + 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 LeverageBracket struct + Brackets []Bracket + Symbol string + type LiquidationOrder struct + AveragePrice string + ExecutedQuantity string + OrigQuantity string + Price string + Side SideType + Status OrderStatusType + Symbol string + Time int64 + TimeInForce TimeInForceType + Type OrderType + type ListAccountTradeService struct + func (s *ListAccountTradeService) Do(ctx context.Context, opts ...RequestOption) (res []*AccountTrade, err error) + func (s *ListAccountTradeService) EndTime(endTime int64) *ListAccountTradeService + func (s *ListAccountTradeService) FromID(fromID int64) *ListAccountTradeService + func (s *ListAccountTradeService) Limit(limit int) *ListAccountTradeService + func (s *ListAccountTradeService) StartTime(startTime int64) *ListAccountTradeService + func (s *ListAccountTradeService) Symbol(symbol string) *ListAccountTradeService + type ListBookTickersService struct + func (s *ListBookTickersService) Do(ctx context.Context, opts ...RequestOption) (res []*BookTicker, err error) + 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) 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) 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) 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) Symbol(symbol string) *ListPriceChangeStatsService + type ListPricesService struct + func (s *ListPricesService) Do(ctx context.Context, opts ...RequestOption) (res []*SymbolPrice, err error) + func (s *ListPricesService) Symbol(symbol string) *ListPricesService + type ListUserLiquidationOrdersService struct + func (s *ListUserLiquidationOrdersService) AutoCloseType(autoCloseType ForceOrderCloseType) *ListUserLiquidationOrdersService + func (s *ListUserLiquidationOrdersService) Do(ctx context.Context, opts ...RequestOption) (res []*UserLiquidationOrder, err error) + func (s *ListUserLiquidationOrdersService) EndTime(endTime int64) *ListUserLiquidationOrdersService + func (s *ListUserLiquidationOrdersService) Limit(limit int) *ListUserLiquidationOrdersService + func (s *ListUserLiquidationOrdersService) StartTime(startTime int64) *ListUserLiquidationOrdersService + func (s *ListUserLiquidationOrdersService) Symbol(symbol string) *ListUserLiquidationOrdersService + type LotSizeFilter struct + MaxQuantity string + MinQuantity string + StepSize string + type MarginType string + type MarketLotSizeFilter struct + MaxQuantity string + MinQuantity string + StepSize string + type MaxNumAlgoOrdersFilter struct + Limit int64 + type MaxNumOrdersFilter struct + Limit int64 + type MinNotionalFilter struct + Notional string + type NewOrderRespType string + type Order struct + ActivatePrice string + AvgPrice string + ClientOrderID string + ClosePosition bool + CumQuantity string + CumQuote string + ExecutedQuantity string + OrderID int64 + OrigQuantity string + OrigType 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 PositionMarginHistory struct + Amount string + Asset string + PositionSide string + Symbol string + Time int64 + Type int + type PositionMode struct + DualSidePosition bool + type PositionRisk struct + EntryPrice string + IsAutoAddMargin string + IsolatedMargin string + IsolatedWallet string + Leverage string + LiquidationPrice string + MarginType string + MarkPrice string + MaxNotionalValue string + Notional string + PositionAmt string + PositionSide string + Symbol string + UnRealizedProfit string + type PositionSideType string + type PremiumIndex struct + LastFundingRate string + MarkPrice string + NextFundingTime int64 + Symbol string + Time int64 + type PremiumIndexService struct + func (s *PremiumIndexService) Do(ctx context.Context, opts ...RequestOption) (res []*PremiumIndex, err error) + func (s *PremiumIndexService) Symbol(symbol string) *PremiumIndexService + type PriceChangeStats struct + CloseTime int64 + Count int64 + FristID int64 + HighPrice string + LastID int64 + LastPrice string + LastQuantity string + LowPrice string + OpenPrice string + OpenTime int64 + PrevClosePrice string + PriceChange string + PriceChangePercent string + QuoteVolume 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 RebateNewUser struct + BrokerId string + IfNewUser bool + RebateWorking bool + type RecentTradesService struct + func (s *RecentTradesService) Do(ctx context.Context, opts ...RequestOption) (res []*Trade, err error) + func (s *RecentTradesService) Limit(limit int) *RecentTradesService + func (s *RecentTradesService) Symbol(symbol string) *RecentTradesService + 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 + ContractType ContractType + DeliveryDate int64 + Filters []map[string]interface{} + MaintMarginPercent string + MarginAsset string + OnboardDate int64 + OrderType []OrderType + Pair string + PricePrecision int + QuantityPrecision int + QuoteAsset string + QuotePrecision int + RequiredMarginPercent string + SettlePlan int64 + Status string + Symbol string + TimeInForce []TimeInForceType + TriggerProtect string + UnderlyingSubType []string + UnderlyingType string + func (s *Symbol) LotSizeFilter() *LotSizeFilter + func (s *Symbol) MarketLotSizeFilter() *MarketLotSizeFilter + func (s *Symbol) MaxNumAlgoOrdersFilter() *MaxNumAlgoOrdersFilter + func (s *Symbol) MaxNumOrdersFilter() *MaxNumOrdersFilter + func (s *Symbol) MinNotionalFilter() *MinNotionalFilter + func (s *Symbol) PercentPriceFilter() *PercentPriceFilter + func (s *Symbol) PriceFilter() *PriceFilter + type SymbolFilterType string + type SymbolLeverage struct + Leverage int + MaxNotionalValue string + Symbol string + type SymbolPrice struct + Price string + Symbol string + type SymbolStatusType string + type SymbolType string + type TimeInForceType string + type Trade struct + ID int64 + IsBuyerMaker bool + Price string + Quantity string + QuoteQuantity string + Time int64 + type TradeV3 struct + Commission string + CommissionAsset string + ID int64 + IsBestMatch bool + IsBuyer bool + IsMaker bool + OrderID int64 + Price string + Quantity string + QuoteQuantity string + Symbol string + Time int64 + 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 UserLiquidationOrder struct + AveragePrice string + ClientOrderId string + ClosePosition bool + CumQuote string + ExecutedQuantity string + OrderId int64 + OrigQuantity string + OrigType string + PositionSide PositionSideType + Price string + ReduceOnly bool + Side SideType + Status OrderStatusType + StopPrice string + Symbol string + Time int64 + TimeInForce TimeInForceType + Type OrderType + UpdateTime int64 + WorkingType WorkingType + 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 WsAllMarkPriceEvent []*WsMarkPriceEvent + type WsAllMarkPriceHandler func(event WsAllMarkPriceEvent) + type WsAllMarketTickerEvent []*WsMarketTickerEvent + type WsAllMarketTickerHandler func(event WsAllMarketTickerEvent) + type WsAllMiniMarketTickerEvent []*WsMiniMarketTickerEvent + type WsAllMiniMarketTickerHandler func(event WsAllMiniMarketTickerEvent) + type WsBLVTBasket struct + Position int64 + Symbol string + type WsBLVTInfoEvent struct + Baskets []WsBLVTBasket + Event string + FundingRate float64 + Issued float64 + Leverage float64 + Nav float64 + Symbol string + TargetLeverage int64 + Time int64 + type WsBLVTInfoHandler func(event *WsBLVTInfoEvent) + type WsBLVTKline struct + ClosePrice string + CloseTime int64 + Count int64 + FirstUpdateTime int64 + HighPrice string + Interval string + LastUpdateTime int64 + Leverage string + LowPrice string + OpenPrice string + StartTime int64 + Symbol string + type WsBLVTKlineEvent struct + Event string + Kline WsBLVTKline + Symbol string + Time int64 + type WsBLVTKlineHandler func(event *WsBLVTKlineEvent) + type WsBalance struct + Asset string + Balance string + ChangeBalance string + CrossWalletBalance string + type WsBookTickerEvent struct + BestAskPrice string + BestAskQty string + BestBidPrice string + BestBidQty string + Event string + Symbol string + Time int64 + TransactionTime int64 + UpdateID int64 + type WsBookTickerHandler func(event *WsBookTickerEvent) + type WsCompositeIndexEvent struct + Composition []WsComposition + Event string + Price string + Symbol string + Time int64 + type WsCompositeIndexHandler func(event *WsCompositeIndexEvent) + type WsComposition struct + BaseAsset string + WeighPercent string + WeightQty string + type WsConfig struct + Endpoint string + type WsDepthEvent struct + Asks []Ask + Bids []Bid + Event string + FirstUpdateID int64 + LastUpdateID int64 + PrevLastUpdateID int64 + Symbol string + Time int64 + TransactionTime int64 + type WsDepthHandler func(event *WsDepthEvent) + type WsHandler func(message []byte) + 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 + 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 + IndexPrice string + MarkPrice string + NextFundingTime int64 + Symbol string + Time int64 + type WsMarkPriceHandler func(event *WsMarkPriceEvent) + 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 + 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 + 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 + IsReduceOnly bool + LastFilledPrice string + LastFilledQty 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 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 + AccountConfigUpdate WsAccountConfigUpdate + AccountUpdate WsAccountUpdate + CrossWalletBalance string + Event UserDataEventType + MarginCallPositions []WsPosition + OrderTradeUpdate WsOrderTradeUpdate + Time int64 + TransactionTime int64 + type WsUserDataHandler func(event *WsUserDataEvent)