Versions in this module Expand all Collapse all v1 v1.0.3 Jan 26, 2024 v1.0.2 Jan 26, 2024 Changes in this version + const INVERSE_MAINNET + const INVERSE_TESTNET + const LINEAR_MAINNET + const LINEAR_TESTNET + const MAINNET + const MAINNET_BACKT + const Name + const OPTION_MAINNET + const OPTION_TESTNET + const SPOT_MAINNET + const SPOT_TESTNET + const TESTNET + const V3_CONTRACT_PRIVATE + const V3_SPOT_PRIVATE + const V3_UNIFIED_PRIVATE + const Version + const WEBSOCKET_PRIVATE_MAINNET + const WEBSOCKET_PRIVATE_TESTNET + func FormatTimestamp(t time.Time) int64 + func GetCurrentTime() int64 + func Ping(b *WebSocket) + func PrettyPrint(i interface{}) string + type AccountClient struct + func (s *AccountClient) GetAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetAccountWallet(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetCoinGreeks(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetCollateralInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetFeeRates(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetMMPState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) GetTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) ResetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) SetCollateralCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) SetMarginMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) SetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) SetSpotHedgeMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AccountClient) UpgradeToUTA(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type AssetClient struct + func (s *AssetClient) CancelWithdrawAsset(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) CreateInternalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) CreateUniversalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetAllCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetAllowedDepositCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetAssetInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetAssetOrderRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetInternalDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetInternalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetMasterDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetSingleCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetSubDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetSubDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetSubUids(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetTransferableCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetUniversalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetWithdrawalAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) GetWithdrawalRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) SetDepositAccount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *AssetClient) WithdrawAsset(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type BrokerServiceClient struct + func (s *BrokerServiceClient) GetBrokerAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *BrokerServiceClient) GetBrokerEarning(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type Client struct + APIKey string + APISecret string + BaseURL string + Debug bool + HTTPClient *http.Client + Logger *log.Logger + func NewBybitHttpClient(apiKey string, APISecret string, options ...ClientOption) *Client + func (c *Client) NewAccountService(params map[string]interface{}) *AccountClient + func (c *Client) NewAccountServiceNoParams() *AccountClient + func (c *Client) NewAssetService(params map[string]interface{}) *AssetClient + func (c *Client) NewBrokerService(params map[string]interface{}) *BrokerServiceClient + func (c *Client) NewFundingTatesService() *MarketFundingRatesService + func (c *Client) NewGetDeliveryPriceService() *GetDeliveryPriceService + func (c *Client) NewGetHistoricalVolatilityService() *GetHistoricalVolatilityService + func (c *Client) NewGetInsuranceInfoService() *GetInsuranceInfoService + func (c *Client) NewGetMarketLSRatioService() *GetMarketLSRatioService + func (c *Client) NewGetOpenInterestsService() *GetOpenInterestsService + func (c *Client) NewGetPublicRecentTradesService() *GetPublicRecentTradesService + func (c *Client) NewGetRiskLimitService() *GetRiskLimitService + func (c *Client) NewGetServerTimeService() *GetServerTimeService + func (c *Client) NewInstrumentsInfoService() *InstrumentsInfoService + func (c *Client) NewLendingService(params map[string]interface{}) *LendingServiceClient + func (c *Client) NewLendingServiceNoParams() *LendingServiceClient + func (c *Client) NewMarketIndexPriceKlineService() *MarketIndexPriceKlineService + func (c *Client) NewMarketKlineService() *MarketKlinesService + func (c *Client) NewMarketMarkPriceKlineService() *MarketMarkPriceKlineService + func (c *Client) NewMarketPremiumIndexPriceKlineService() *MarketPremiumIndexPriceKlineService + func (c *Client) NewOrderBookService() *MarketOrderBookService + func (c *Client) NewPlaceOrderService(category, symbol, side, orderType, qty string) *Order + func (c *Client) NewPositionService(params map[string]interface{}) *PositionClient + func (c *Client) NewPreUpgradeService(params map[string]interface{}) *PreUpgradeClient + func (c *Client) NewSpotLeverageService(params map[string]interface{}) *SpotLeverageClient + func (c *Client) NewSpotMarginDataService(params map[string]interface{}, isUta bool) *SpotMarginClient + func (c *Client) NewTickersService() *MarketTickersService + func (c *Client) NewTradeService(params map[string]interface{}) *TradeClient + func (c *Client) NewUserService(params map[string]interface{}) *UserServiceClient + func (c *Client) NewUserServiceNoParams() *UserServiceClient + type ClientOption func(*Client) + func WithBaseURL(baseURL string) ClientOption + func WithDebug(debug bool) ClientOption + type ErrorHandler func(name string, err error) + type GetDeliveryPriceResponse struct + Result models.DeliveryPriceInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetDeliveryPriceService struct + func (s *GetDeliveryPriceService) BaseCoin(baseCoin string) *GetDeliveryPriceService + func (s *GetDeliveryPriceService) Category(category models.Category) *GetDeliveryPriceService + func (s *GetDeliveryPriceService) Cursor(cursor string) *GetDeliveryPriceService + func (s *GetDeliveryPriceService) Do(ctx context.Context, opts ...RequestOption) (res *models.DeliveryPriceInfo, err error) + func (s *GetDeliveryPriceService) Limit(limit int) *GetDeliveryPriceService + func (s *GetDeliveryPriceService) Symbol(symbol string) *GetDeliveryPriceService + type GetHistoricalVolatilityService struct + func (s *GetHistoricalVolatilityService) BaseCoin(baseCoin string) *GetHistoricalVolatilityService + func (s *GetHistoricalVolatilityService) Category(category models.Category) *GetHistoricalVolatilityService + func (s *GetHistoricalVolatilityService) Do(ctx context.Context, opts ...RequestOption) (res *models.HistoricalVolatilityInfo, err error) + func (s *GetHistoricalVolatilityService) EndTime(endTime uint64) *GetHistoricalVolatilityService + func (s *GetHistoricalVolatilityService) Period(period string) *GetHistoricalVolatilityService + func (s *GetHistoricalVolatilityService) StartTime(startTime uint64) *GetHistoricalVolatilityService + type GetInsuranceInfoResponse struct + Result models.MarketInsuranceInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetInsuranceInfoService struct + func (s *GetInsuranceInfoService) Coin(coin string) *GetInsuranceInfoService + func (s *GetInsuranceInfoService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketInsuranceInfo, err error) + type GetMarketLSRatioResponse struct + Result models.MarketLongShortRatioInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetMarketLSRatioService struct + func (s *GetMarketLSRatioService) BaseCoin(baseCoin string) *GetMarketLSRatioService + func (s *GetMarketLSRatioService) Category(category models.Category) *GetMarketLSRatioService + func (s *GetMarketLSRatioService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketLongShortRatioInfo, err error) + func (s *GetMarketLSRatioService) Limit(limit int) *GetMarketLSRatioService + func (s *GetMarketLSRatioService) Period(period string) *GetMarketLSRatioService + type GetOpenInterestsResponse struct + Result models.OpenInterestInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetOpenInterestsService struct + func (s *GetOpenInterestsService) Category(category models.Category) *GetOpenInterestsService + func (s *GetOpenInterestsService) Cursor(cursor string) *GetOpenInterestsService + func (s *GetOpenInterestsService) Do(ctx context.Context, opts ...RequestOption) (res *models.OpenInterestInfo, err error) + func (s *GetOpenInterestsService) EndTime(endTime uint64) *GetOpenInterestsService + func (s *GetOpenInterestsService) IntervalTime(intervalTime string) *GetOpenInterestsService + func (s *GetOpenInterestsService) Limit(limit int) *GetOpenInterestsService + func (s *GetOpenInterestsService) StartTime(startTime uint64) *GetOpenInterestsService + func (s *GetOpenInterestsService) Symbol(symbol string) *GetOpenInterestsService + type GetPublicRecentTradesResponse struct + Result models.PublicRecentTradeHistory + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetPublicRecentTradesService struct + func (s *GetPublicRecentTradesService) BaseCoin(baseCoin string) *GetPublicRecentTradesService + func (s *GetPublicRecentTradesService) Category(category models.Category) *GetPublicRecentTradesService + func (s *GetPublicRecentTradesService) Do(ctx context.Context, opts ...RequestOption) (res *models.PublicRecentTradeHistory, err error) + func (s *GetPublicRecentTradesService) Limit(limit int) *GetPublicRecentTradesService + func (s *GetPublicRecentTradesService) OptionType(optionType string) *GetPublicRecentTradesService + func (s *GetPublicRecentTradesService) Symbol(symbol string) *GetPublicRecentTradesService + type GetRiskLimitResponse struct + Result models.MarketRiskLimitInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetRiskLimitService struct + func (s *GetRiskLimitService) Category(category models.Category) *GetRiskLimitService + func (s *GetRiskLimitService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketRiskLimitInfo, err error) + func (s *GetRiskLimitService) Symbol(symbol string) *GetRiskLimitService + type GetServerTimeResponse struct + Result models.ServerTimeResult + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type GetServerTimeService struct + func (s *GetServerTimeService) Do(ctx context.Context, opts ...RequestOption) (res *models.ServerTimeResult, err error) + type InstrumentsInfoService struct + func (s *InstrumentsInfoService) BaseCoin(baseCoin string) *InstrumentsInfoService + func (s *InstrumentsInfoService) Category(category models.Category) *InstrumentsInfoService + func (s *InstrumentsInfoService) Cursor(cursor string) *InstrumentsInfoService + func (s *InstrumentsInfoService) Do(ctx context.Context, opts ...RequestOption) (res *models.InstrumentInfoResponse, err error) + func (s *InstrumentsInfoService) Limit(limit int) *InstrumentsInfoService + func (s *InstrumentsInfoService) Status(status models.SymbolStatus) *InstrumentsInfoService + func (s *InstrumentsInfoService) Symbol(symbol string) *InstrumentsInfoService + type LendingServiceClient struct + func (s *LendingServiceClient) C2cCancelRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) C2cDepositFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) C2cRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetC2cLendingAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetC2cLendingCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetC2cLendingOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetInsLoanInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetInsLoanOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetInsLoanToValue(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetInsMarginCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *LendingServiceClient) GetInsRepayOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type MarketFundingRatesResponse struct + Result models.FundingRate + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type MarketFundingRatesService struct + func (s *MarketFundingRatesService) Category(category models.Category) *MarketFundingRatesService + func (s *MarketFundingRatesService) Do(ctx context.Context, opts ...RequestOption) (res *models.FundingRate, err error) + func (s *MarketFundingRatesService) EndTime(endTime uint64) *MarketFundingRatesService + func (s *MarketFundingRatesService) Limit(limit int) *MarketFundingRatesService + func (s *MarketFundingRatesService) StartTime(startTime uint64) *MarketFundingRatesService + func (s *MarketFundingRatesService) Symbol(symbol string) *MarketFundingRatesService + type MarketIndexPriceKlineService struct + func (s *MarketIndexPriceKlineService) Category(category models.Category) *MarketIndexPriceKlineService + func (s *MarketIndexPriceKlineService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketIndexPriceKlineResponse, err error) + func (s *MarketIndexPriceKlineService) End(endTime uint64) *MarketIndexPriceKlineService + func (s *MarketIndexPriceKlineService) Interval(interval string) *MarketIndexPriceKlineService + func (s *MarketIndexPriceKlineService) Limit(limit int) *MarketIndexPriceKlineService + func (s *MarketIndexPriceKlineService) Start(startTime uint64) *MarketIndexPriceKlineService + func (s *MarketIndexPriceKlineService) Symbol(symbol string) *MarketIndexPriceKlineService + type MarketKlinesService struct + func (s *MarketKlinesService) Category(category models.Category) *MarketKlinesService + func (s *MarketKlinesService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketKlineResponse, err error) + func (s *MarketKlinesService) End(endTime uint64) *MarketKlinesService + func (s *MarketKlinesService) Interval(interval string) *MarketKlinesService + func (s *MarketKlinesService) Limit(limit int) *MarketKlinesService + func (s *MarketKlinesService) Start(startTime uint64) *MarketKlinesService + func (s *MarketKlinesService) Symbol(symbol string) *MarketKlinesService + type MarketMarkPriceKlineService struct + func (s *MarketMarkPriceKlineService) Category(category models.Category) *MarketMarkPriceKlineService + func (s *MarketMarkPriceKlineService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketMarkPriceKlineResponse, err error) + func (s *MarketMarkPriceKlineService) End(endTime uint64) *MarketMarkPriceKlineService + func (s *MarketMarkPriceKlineService) Interval(interval string) *MarketMarkPriceKlineService + func (s *MarketMarkPriceKlineService) Limit(limit int) *MarketMarkPriceKlineService + func (s *MarketMarkPriceKlineService) Start(startTime uint64) *MarketMarkPriceKlineService + func (s *MarketMarkPriceKlineService) Symbol(symbol string) *MarketMarkPriceKlineService + type MarketOrderBookResponse struct + Result models.OrderBookInfo + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type MarketOrderBookService struct + func (s *MarketOrderBookService) Category(category models.Category) *MarketOrderBookService + func (s *MarketOrderBookService) Do(ctx context.Context, opts ...RequestOption) (res *models.OrderBookInfo, err error) + func (s *MarketOrderBookService) Limit(limit int) *MarketOrderBookService + func (s *MarketOrderBookService) Symbol(symbol string) *MarketOrderBookService + type MarketPremiumIndexPriceKlineService struct + func (s *MarketPremiumIndexPriceKlineService) Category(category models.Category) *MarketPremiumIndexPriceKlineService + func (s *MarketPremiumIndexPriceKlineService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketPremiumIndexPriceKlineResponse, err error) + func (s *MarketPremiumIndexPriceKlineService) End(endTime uint64) *MarketPremiumIndexPriceKlineService + func (s *MarketPremiumIndexPriceKlineService) Interval(interval string) *MarketPremiumIndexPriceKlineService + func (s *MarketPremiumIndexPriceKlineService) Limit(limit int) *MarketPremiumIndexPriceKlineService + func (s *MarketPremiumIndexPriceKlineService) Start(startTime uint64) *MarketPremiumIndexPriceKlineService + func (s *MarketPremiumIndexPriceKlineService) Symbol(symbol string) *MarketPremiumIndexPriceKlineService + type MarketTickersResponse struct + Result models.MarketTickers + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type MarketTickersService struct + func (s *MarketTickersService) BaseCoin(baseCoin string) *MarketTickersService + func (s *MarketTickersService) Category(category models.Category) *MarketTickersService + func (s *MarketTickersService) Do(ctx context.Context, opts ...RequestOption) (res *models.MarketTickers, err error) + func (s *MarketTickersService) ExpDate(expDate string) *MarketTickersService + func (s *MarketTickersService) Symbol(symbol string) *MarketTickersService + type MessageHandler func(message string) error + type Order struct + func (order *Order) CloseOnTrigger(close bool) *Order + func (order *Order) Do(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (order *Order) IsLeverage(isLeverage int) *Order + func (order *Order) Mmp(mmp bool) *Order + func (order *Order) OrderFilter(filter string) *Order + func (order *Order) OrderIv(iv string) *Order + func (order *Order) OrderLinkId(orderLinkId string) *Order + func (order *Order) PositionIdx(idx int) *Order + func (order *Order) Price(price string) *Order + func (order *Order) ReduceOnly(reduce bool) *Order + func (order *Order) SlLimitPrice(price string) *Order + func (order *Order) SlOrderType(orderType string) *Order + func (order *Order) SlTriggerBy(triggerBy string) *Order + func (order *Order) SmpType(smp string) *Order + func (order *Order) StopLoss(loss string) *Order + func (order *Order) TakeProfit(profit string) *Order + func (order *Order) TimeInForce(tif string) *Order + func (order *Order) TpLimitPrice(price string) *Order + func (order *Order) TpOrderType(orderType string) *Order + func (order *Order) TpTriggerBy(triggerBy string) *Order + func (order *Order) TpslMode(mode string) *Order + func (order *Order) TriggerBy(triggerBy string) *Order + func (order *Order) TriggerDirection(direction int) *Order + func (order *Order) TriggerPrice(triggerPrice string) *Order + type PositionClient struct + func (s *PositionClient) ConfirmPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) GetClosePnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) GetExecutionList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) GetPositionList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SetPositionAutoMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SetPositionLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SetPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SetPositionTpslMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SetPositionTradingStop(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SwitchPositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) SwitchPositionMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PositionClient) UpdatePositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type PreUpgradeClient struct + func (s *PreUpgradeClient) GetPreUpgradeClosedPnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PreUpgradeClient) GetPreUpgradeExecutionList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PreUpgradeClient) GetPreUpgradeOptionDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PreUpgradeClient) GetPreUpgradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PreUpgradeClient) GetPreUpgradeTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *PreUpgradeClient) GetPreUpgradeUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type RequestOption func(*request) + func WithRecvWindow(recvWindow string) RequestOption + type ServerResponse struct + Result interface{} + RetCode int + RetExtInfo struct{} + RetMsg string + Time int64 + type SpotLeverageClient struct + func (s *SpotLeverageClient) GetLeverageTokenInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotLeverageClient) GetLeverageTokenMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotLeverageClient) GetLeverageTokenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotLeverageClient) PurchaseLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotLeverageClient) RedeemLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type SpotMarginClient struct + func (s *SpotMarginClient) BorrowSpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginBorrowCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginBorrowOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginData(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginInterests(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginLoanAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginRepaymentOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) GetSpotMarginState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) RepaySpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) SetSpotMarginLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *SpotMarginClient) ToggleSpotMarginTrade(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type TradeClient struct + func (s *TradeClient) AmendBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error) + func (s *TradeClient) AmendOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) CancelAllOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) CancelBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error) + func (s *TradeClient) CancelOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) GetOpenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) GetOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) GetSpotBorrowQuota(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) PlaceBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error) + func (s *TradeClient) PlaceOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *TradeClient) SetDisconnectCancelAll(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type UserServiceClient struct + func (s *UserServiceClient) CreateSubApiKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) CreateSubMember(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) DeleteMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) DeleteSubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) DeleteSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) FreezeSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) GetAPIKeyInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) GetAffiliateUserInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) GetSubUidList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) GetUidWalletType(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) ModifyMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + func (s *UserServiceClient) ModifySubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) + type WebSocket struct + func NewBybitPrivateWebSocket(url, apiKey, apiSecret string, handler MessageHandler, ...) *WebSocket + func NewBybitPublicWebSocket(url string, pingInterval int, handler MessageHandler, ...) *WebSocket + func (b *WebSocket) Connect(args []string) error + func (b *WebSocket) Disconnect() error + func (b *WebSocket) Send(message string) error + func (b *WebSocket) SendAsJson(v interface{}) error + func (b *WebSocket) SetErrorHandler(handler ErrorHandler) + func (b *WebSocket) SetMessageHandler(handler MessageHandler) + type WebsocketOption func(*WebSocket) + func WithMaxAliveTime(maxAliveTime string) WebsocketOption + func WithPingInterval(pingInterval int) WebsocketOption