Documentation
¶
Index ¶
- Constants
- func FormatTimestamp(t time.Time) int64
- func GetBatchOrderServerResponse(err error, data []byte) (*models.BatchOrderServerResponse, error)
- func GetCurrentTime() int64
- func GetIndexPriceKline(err error, data []byte, res *models.MarketIndexPriceKlineResponse) (*models.MarketIndexPriceKlineResponse, error)
- func GetMarkPriceKline(err error, data []byte, res *models.MarketMarkPriceKlineResponse) (*models.MarketMarkPriceKlineResponse, error)
- func GetMarketKlineResponse(err error, data []byte, res *models.MarketKlineResponse) (*models.MarketKlineResponse, *models.MarketKlineResponse, error)
- func GetPremiumIndexKline(err error, data []byte, res *models.MarketPremiumIndexPriceKlineResponse) (*models.MarketPremiumIndexPriceKlineResponse, error)
- func PrettyPrint(i interface{}) string
- func SendRequest(ctx context.Context, opts []RequestOption, r *request, s *BybitClientRequest, ...) ([]byte, error)
- type BybitClientRequest
- func (s *BybitClientRequest) AdjustCollateralAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) AdjustCryptoLoanToValue(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) AmendBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
- func (s *BybitClientRequest) AmendOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) AmendSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) AssociateInsLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) BatchSetCollateralCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) BorrowCryptoLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) BorrowFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) BorrowFlexibleLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) BorrowSpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) C2cCancelRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) C2cDepositFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) C2cRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) CancelAllOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelAllSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
- func (s *BybitClientRequest) CancelBorrowFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelSupplyFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CancelWithdraw(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ConfirmConvertQuote(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ConfirmPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CreateInternalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CreateSubApiKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CreateSubMember(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CreateUniversalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) CreateWithdraw(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) DeleteMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) DeleteSubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) DeleteSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) DistributeBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) FixedLoanRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) FreezeSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAPIKeyInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAccountWallet(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAffiliateUserInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAffiliateUserList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAllCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAllSubMembersDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAllowedDepositCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAssetInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetAssetOrderRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetBorrowableCoins(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetBrokerAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetBrokerEarning(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetC2cLendingAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetC2cLendingCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetC2cLendingOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetClosePnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCoinGreeks(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCollateralAdjustHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCollateralCoins(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCollateralInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetConvertCoinList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetConvertHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetConvertStatus(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCryptoLoanAdjustHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanBorrowInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanBorrowLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanCollateralInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanCompletedHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanMaxCollateral(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetCryptoLoanRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCryptoLoanUnpaidLoans(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetCustodianSubAccounts(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetDeliveryPrice(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetDisconnectProtectionInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetEarnProductInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetEarnRedeemOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetEarnRedeemPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetExchangeEntityList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFeeRates(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedBorrowContract(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedBorrowingMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedSupplyContract(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedSupplyHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFixedSupplyingMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFlexibleBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFlexibleLoans(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFlexibleRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetFundingRateHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetHistoryVolatility(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetIndexPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInsLoanInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInsLoanOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInsLoanToValue(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInsMarginCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInsRepayOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInstrumentInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInternalDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetInternalTransferRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetLeverageTokenInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetLeverageTokenMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetLeverageTokenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetLongShortRatio(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMMPState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMarkPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMarketInsurance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMarketKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMarketRiskLimits(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMarketTickers(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMasterAccDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMaxCollateralAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetMovePositionHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOpenInterests(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOpenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOptionClosedPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOrderBookInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetOrderPriceLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPositionList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeClosedPnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeOptionDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPreUpgradeUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPremiumIndexPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetPublicRecentTrades(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSelfMarketProtectionGroup(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetServerTime(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSingleCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpotBorrowQuota(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpotMarginBorrowCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetSpotMarginBorrowOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetSpotMarginCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetSpotMarginData(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpotMarginInterests(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpotMarginLoanAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetSpotMarginRepaymentOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) GetSpotMarginState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadRecentTrade(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadTradeInstrumentsInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadTradeOrderBook(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadTradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSpreadTradeTickers(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubAccDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubAccUids(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubMemberDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubUidApiKeysInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubUidList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetSubUidListUnlimited(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetTieredCollateralData(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetTransferableAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetTransferableCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetUidWalletType(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetUniversalTransferRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetWithdrawalAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) GetWithdrawalRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ModifyMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ModifySubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) MovePosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) PlaceBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
- func (s *BybitClientRequest) PlaceOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) PlacePreCheckOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) PlaceSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) PurchaseLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) QueryBrokerVoucherSpec(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) QueryDistributedBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RedeemEarnOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RedeemLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) RepayCryptoLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) RepayFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RepayFlexibleLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RepayLiability(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RepaySpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) RequestConvertQuote(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) RequestTestFund(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ResetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetCollateralCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetDepositAccount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetDisconnectCancelAll(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetMarginMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetPositionAutoMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetPositionLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) SetPositionTpslMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)deprecated
- func (s *BybitClientRequest) SetPositionTradingStop(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetSpotHedgeMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SetSpotMarginLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SupplyFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SwitchPositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) SwitchPositionMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) ToggleSpotMarginTrade(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) UpdatePositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- func (s *BybitClientRequest) UpgradeToUTA(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
- type Client
- func (c *Client) NewClassicalBybitServiceNoParams() *BybitClientRequest
- func (c *Client) NewClassicalBybitServiceWithParams(params map[string]interface{}) *BybitClientRequest
- func (c *Client) NewPlaceOrderService(category, symbol, side, orderType, qty string) *Order
- func (c *Client) NewUtaBybitServiceNoParams() *BybitClientRequest
- func (c *Client) NewUtaBybitServiceWithParams(params map[string]interface{}) *BybitClientRequest
- type ClientOption
- type MessageHandler
- type Order
- 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) MarketUnit(marketUnit string) *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) SlippageTolerance(slippageTolerance string) *Order
- func (order *Order) SlippageToleranceType(slippageToleranceType 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 RequestOption
- type ServerResponse
- type WebSocket
- func (b *WebSocket) Connect() *WebSocket
- func (b *WebSocket) Disconnect() error
- func (b *WebSocket) SendRequest(op string, args map[string]interface{}, headers map[string]string, ...) (*WebSocket, error)
- func (b *WebSocket) SendSubscription(args []string) (*WebSocket, error)
- func (b *WebSocket) SendTradeRequest(tradeTruest map[string]interface{}) (*WebSocket, error)
- func (b *WebSocket) SetMessageHandler(handler MessageHandler)
- type WebsocketOption
Constants ¶
const ( Name = "bybit.api.go" Version = "1.0.7" // Https MAINNET = "https://api.bybit.com" MAINNET_BACKT = "https://api.bytick.com" TESTNET = "https://api-testnet.bybit.com" DEMO_ENV = "https://api-demo.bybit.com" NETHERLAND_ENV = "https://api.bybit.nl" HONGKONG_ENV = "https://api.byhkbit.com" TURKEY_ENV = "https://api.bybit-tr.com" KAZAKHSTAN_ENV = "https://api.bybit.kz" // WebSocket public channel - Mainnet SPOT_MAINNET = "wss://stream.bybit.com/v5/public/spot" LINEAR_MAINNET = "wss://stream.bybit.com/v5/public/linear" INVERSE_MAINNET = "wss://stream.bybit.com/v5/public/inverse" SPREAD_MAINNET = "wss://stream.bybit.com/v5/public/spread" // WebSocket public channel - Testnet SPOT_TESTNET = "wss://stream-testnet.bybit.com/v5/public/spot" LINEAR_TESTNET = "wss://stream-testnet.bybit.com/v5/public/linear" INVERSE_TESTNET = "wss://stream-testnet.bybit.com/v5/public/inverse" OPTION_TESTNET = "wss://stream-testnet.bybit.com/v5/public/option" SPREAD_TESTNET = "wss://stream-testnet.bybit.com/v5/public/spread" // WebSocket private channel WEBSOCKET_PRIVATE_MAINNET = "wss://stream.bybit.com/v5/private" WEBSOCKET_TRADE_MAINNET = "wss://stream.bybit.com/v5/trade" WEBSOCKET_PRIVATE_TESTNET = "wss://stream-testnet.bybit.com/v5/private" WEBSOCKET_TRADE_TESTNET = "wss://stream-testnet.bybit.com/v5/trade" WEBSOCKET_PRIVATE_DEMO = "wss://stream-demo.bybit.com/v5/private" WEBSOCKET_TRADE_DEMO = "wss://stream-demo.bybit.com/v5/trade" // Deprecated: V3 is deprecated and replaced by v5 V3_CONTRACT_PRIVATE = "wss://stream.bybit.com/contract/private/v3" V3_UNIFIED_PRIVATE = "wss://stream.bybit.com/unified/private/v3" V3_SPOT_PRIVATE = "wss://stream.bybit.com/spot/private/v3" )
Variables ¶
This section is empty.
Functions ¶
func FormatTimestamp ¶
FormatTimestamp formats a time into Unix timestamp in milliseconds, as requested by Binance.
func GetBatchOrderServerResponse ¶
func GetBatchOrderServerResponse(err error, data []byte) (*models.BatchOrderServerResponse, error)
func GetCurrentTime ¶
func GetCurrentTime() int64
func GetIndexPriceKline ¶
func GetIndexPriceKline(err error, data []byte, res *models.MarketIndexPriceKlineResponse) (*models.MarketIndexPriceKlineResponse, error)
func GetMarkPriceKline ¶
func GetMarkPriceKline(err error, data []byte, res *models.MarketMarkPriceKlineResponse) (*models.MarketMarkPriceKlineResponse, error)
func GetMarketKlineResponse ¶
func GetMarketKlineResponse(err error, data []byte, res *models.MarketKlineResponse) (*models.MarketKlineResponse, *models.MarketKlineResponse, error)
func GetPremiumIndexKline ¶
func GetPremiumIndexKline(err error, data []byte, res *models.MarketPremiumIndexPriceKlineResponse) (*models.MarketPremiumIndexPriceKlineResponse, error)
func PrettyPrint ¶
func PrettyPrint(i interface{}) string
func SendRequest ¶
func SendRequest(ctx context.Context, opts []RequestOption, r *request, s *BybitClientRequest, err error) ([]byte, error)
Types ¶
type BybitClientRequest ¶
type BybitClientRequest struct {
// contains filtered or unexported fields
}
func (*BybitClientRequest) AdjustCollateralAmount ¶
func (s *BybitClientRequest) AdjustCollateralAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) AdjustCryptoLoanToValue
deprecated
func (s *BybitClientRequest) AdjustCryptoLoanToValue(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: AdjustCryptoLoanToValue is deprecated.
func (*BybitClientRequest) AmendBatchOrder ¶
func (s *BybitClientRequest) AmendBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
func (*BybitClientRequest) AmendOrder ¶
func (s *BybitClientRequest) AmendOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) AmendSpreadTradeOrder ¶
func (s *BybitClientRequest) AmendSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) AssociateInsLoan ¶
func (s *BybitClientRequest) AssociateInsLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) BatchSetCollateralCoin ¶
func (s *BybitClientRequest) BatchSetCollateralCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) BorrowCryptoLoan
deprecated
func (s *BybitClientRequest) BorrowCryptoLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: BorrowCryptoLoan is deprecated.
func (*BybitClientRequest) BorrowFixedLoan ¶
func (s *BybitClientRequest) BorrowFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) BorrowFlexibleLoan ¶
func (s *BybitClientRequest) BorrowFlexibleLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) BorrowSpotMarginLoan
deprecated
func (s *BybitClientRequest) BorrowSpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: BorrowSpotMarginLoan is deprecated.
func (*BybitClientRequest) C2cCancelRedeemFunds
deprecated
func (s *BybitClientRequest) C2cCancelRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: C2cCancelRedeemFunds is deprecated.
func (*BybitClientRequest) C2cDepositFunds
deprecated
func (s *BybitClientRequest) C2cDepositFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: C2cDepositFunds is deprecated.
func (*BybitClientRequest) C2cRedeemFunds
deprecated
func (s *BybitClientRequest) C2cRedeemFunds(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: C2cRedeemFunds is deprecated.
func (*BybitClientRequest) CancelAllOrders ¶
func (s *BybitClientRequest) CancelAllOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelAllSpreadTradeOrder ¶
func (s *BybitClientRequest) CancelAllSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelBatchOrder ¶
func (s *BybitClientRequest) CancelBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
func (*BybitClientRequest) CancelBorrowFixedLoan ¶
func (s *BybitClientRequest) CancelBorrowFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelOrder ¶
func (s *BybitClientRequest) CancelOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelSpreadTradeOrder ¶
func (s *BybitClientRequest) CancelSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelSupplyFixedLoan ¶
func (s *BybitClientRequest) CancelSupplyFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CancelWithdraw ¶
func (s *BybitClientRequest) CancelWithdraw(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ConfirmConvertQuote ¶
func (s *BybitClientRequest) ConfirmConvertQuote(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ConfirmPositionRiskLimit ¶
func (s *BybitClientRequest) ConfirmPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CreateInternalTransfer ¶
func (s *BybitClientRequest) CreateInternalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CreateSubApiKey ¶
func (s *BybitClientRequest) CreateSubApiKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CreateSubMember ¶
func (s *BybitClientRequest) CreateSubMember(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CreateUniversalTransfer ¶
func (s *BybitClientRequest) CreateUniversalTransfer(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) CreateWithdraw ¶
func (s *BybitClientRequest) CreateWithdraw(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) DeleteMasterAPIKey ¶
func (s *BybitClientRequest) DeleteMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) DeleteSubAPIKey ¶
func (s *BybitClientRequest) DeleteSubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) DeleteSubUID ¶
func (s *BybitClientRequest) DeleteSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) DistributeBrokerVoucher ¶
func (s *BybitClientRequest) DistributeBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) FixedLoanRepaymentHistory ¶
func (s *BybitClientRequest) FixedLoanRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) FreezeSubUID ¶
func (s *BybitClientRequest) FreezeSubUID(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAPIKeyInfo ¶
func (s *BybitClientRequest) GetAPIKeyInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAccountInfo ¶
func (s *BybitClientRequest) GetAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAccountWallet ¶
func (s *BybitClientRequest) GetAccountWallet(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAffiliateUserInfo ¶
func (s *BybitClientRequest) GetAffiliateUserInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAffiliateUserList ¶
func (s *BybitClientRequest) GetAffiliateUserList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAllCoinsBalance ¶
func (s *BybitClientRequest) GetAllCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAllSubMembersDepositRecords ¶
func (s *BybitClientRequest) GetAllSubMembersDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAllowedDepositCoin ¶
func (s *BybitClientRequest) GetAllowedDepositCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAssetInfo ¶
func (s *BybitClientRequest) GetAssetInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetAssetOrderRecord ¶
func (s *BybitClientRequest) GetAssetOrderRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetBorrowHistory ¶
func (s *BybitClientRequest) GetBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetBorrowableCoins ¶
func (s *BybitClientRequest) GetBorrowableCoins(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetBrokerAccountInfo ¶
func (s *BybitClientRequest) GetBrokerAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetBrokerEarning ¶
func (s *BybitClientRequest) GetBrokerEarning(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetC2cLendingAccountInfo
deprecated
func (s *BybitClientRequest) GetC2cLendingAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetC2cLendingAccountInfo is deprecated.
func (*BybitClientRequest) GetC2cLendingCoinInfo
deprecated
func (s *BybitClientRequest) GetC2cLendingCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetC2cLendingCoinInfo is deprecated.
func (*BybitClientRequest) GetC2cLendingOrders
deprecated
func (s *BybitClientRequest) GetC2cLendingOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetC2cLendingOrders is deprecated.
func (*BybitClientRequest) GetClosePnl ¶
func (s *BybitClientRequest) GetClosePnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCoinGreeks ¶
func (s *BybitClientRequest) GetCoinGreeks(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCoinInfo ¶
func (s *BybitClientRequest) GetCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCollateralAdjustHistory ¶
func (s *BybitClientRequest) GetCollateralAdjustHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCollateralCoins ¶
func (s *BybitClientRequest) GetCollateralCoins(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCollateralInfo ¶
func (s *BybitClientRequest) GetCollateralInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetConvertCoinList ¶
func (s *BybitClientRequest) GetConvertCoinList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetConvertHistory ¶
func (s *BybitClientRequest) GetConvertHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetConvertStatus ¶
func (s *BybitClientRequest) GetConvertStatus(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCryptoLoanAdjustHistory
deprecated
func (s *BybitClientRequest) GetCryptoLoanAdjustHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanAdjustHistory is deprecated.
func (*BybitClientRequest) GetCryptoLoanBorrowHistory
deprecated
func (s *BybitClientRequest) GetCryptoLoanBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanBorrowHistory is deprecated.
func (*BybitClientRequest) GetCryptoLoanBorrowInfo
deprecated
func (s *BybitClientRequest) GetCryptoLoanBorrowInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanBorrowInfo is deprecated.
func (*BybitClientRequest) GetCryptoLoanBorrowLimit
deprecated
func (s *BybitClientRequest) GetCryptoLoanBorrowLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanBorrowLimit is deprecated.
func (*BybitClientRequest) GetCryptoLoanCollateralInfo
deprecated
func (s *BybitClientRequest) GetCryptoLoanCollateralInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanCollateralInfo is deprecated.
func (*BybitClientRequest) GetCryptoLoanCompletedHistory
deprecated
func (s *BybitClientRequest) GetCryptoLoanCompletedHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanCompletedHistory is deprecated.
func (*BybitClientRequest) GetCryptoLoanMaxCollateral
deprecated
func (s *BybitClientRequest) GetCryptoLoanMaxCollateral(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanMaxCollateral is deprecated.
func (*BybitClientRequest) GetCryptoLoanPosition ¶
func (s *BybitClientRequest) GetCryptoLoanPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetCryptoLoanRepaymentHistory
deprecated
func (s *BybitClientRequest) GetCryptoLoanRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanRepaymentHistory is deprecated.
func (*BybitClientRequest) GetCryptoLoanUnpaidLoans
deprecated
func (s *BybitClientRequest) GetCryptoLoanUnpaidLoans(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetCryptoLoanUnpaidLoans is deprecated.
func (*BybitClientRequest) GetCustodianSubAccounts ¶
func (s *BybitClientRequest) GetCustodianSubAccounts(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetDeliveryPrice ¶
func (s *BybitClientRequest) GetDeliveryPrice(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetDeliveryRecord ¶
func (s *BybitClientRequest) GetDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetDepositRecords ¶
func (s *BybitClientRequest) GetDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetDisconnectProtectionInfo ¶
func (s *BybitClientRequest) GetDisconnectProtectionInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetEarnProductInfo ¶
func (s *BybitClientRequest) GetEarnProductInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetEarnRedeemOrder ¶
func (s *BybitClientRequest) GetEarnRedeemOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetEarnRedeemPosition ¶
func (s *BybitClientRequest) GetEarnRedeemPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetExchangeEntityList ¶
func (s *BybitClientRequest) GetExchangeEntityList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFeeRates ¶
func (s *BybitClientRequest) GetFeeRates(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedBorrowContract ¶
func (s *BybitClientRequest) GetFixedBorrowContract(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedBorrowHistory ¶
func (s *BybitClientRequest) GetFixedBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedBorrowingMarket ¶
func (s *BybitClientRequest) GetFixedBorrowingMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedSupplyContract ¶
func (s *BybitClientRequest) GetFixedSupplyContract(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedSupplyHistory ¶
func (s *BybitClientRequest) GetFixedSupplyHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFixedSupplyingMarket ¶
func (s *BybitClientRequest) GetFixedSupplyingMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFlexibleBorrowHistory ¶
func (s *BybitClientRequest) GetFlexibleBorrowHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFlexibleLoans ¶
func (s *BybitClientRequest) GetFlexibleLoans(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFlexibleRepaymentHistory ¶
func (s *BybitClientRequest) GetFlexibleRepaymentHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetFundingRateHistory ¶
func (s *BybitClientRequest) GetFundingRateHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetHistoryVolatility ¶
func (s *BybitClientRequest) GetHistoryVolatility(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetIndexPriceKline ¶
func (s *BybitClientRequest) GetIndexPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInsLoanInfo ¶
func (s *BybitClientRequest) GetInsLoanInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInsLoanOrders ¶
func (s *BybitClientRequest) GetInsLoanOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInsLoanToValue ¶
func (s *BybitClientRequest) GetInsLoanToValue(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInsMarginCoinInfo ¶
func (s *BybitClientRequest) GetInsMarginCoinInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInsRepayOrders ¶
func (s *BybitClientRequest) GetInsRepayOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInstrumentInfo ¶
func (s *BybitClientRequest) GetInstrumentInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInternalDepositRecords ¶
func (s *BybitClientRequest) GetInternalDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetInternalTransferRecords ¶
func (s *BybitClientRequest) GetInternalTransferRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetLeverageTokenInfo
deprecated
func (s *BybitClientRequest) GetLeverageTokenInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetLeverageTokenInfo is deprecated.
func (*BybitClientRequest) GetLeverageTokenMarket
deprecated
func (s *BybitClientRequest) GetLeverageTokenMarket(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetLeverageTokenMarket is deprecated.
func (*BybitClientRequest) GetLeverageTokenOrders
deprecated
func (s *BybitClientRequest) GetLeverageTokenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetLeverageTokenOrders is deprecated.
func (*BybitClientRequest) GetLongShortRatio ¶
func (s *BybitClientRequest) GetLongShortRatio(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMMPState ¶
func (s *BybitClientRequest) GetMMPState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMarkPriceKline ¶
func (s *BybitClientRequest) GetMarkPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMarketInsurance ¶
func (s *BybitClientRequest) GetMarketInsurance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMarketKline ¶
func (s *BybitClientRequest) GetMarketKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMarketRiskLimits ¶
func (s *BybitClientRequest) GetMarketRiskLimits(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMarketTickers ¶
func (s *BybitClientRequest) GetMarketTickers(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMasterAccDepositAddress ¶
func (s *BybitClientRequest) GetMasterAccDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMaxCollateralAmount ¶
func (s *BybitClientRequest) GetMaxCollateralAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetMovePositionHistory ¶
func (s *BybitClientRequest) GetMovePositionHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOpenInterests ¶
func (s *BybitClientRequest) GetOpenInterests(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOpenOrders ¶
func (s *BybitClientRequest) GetOpenOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOptionClosedPosition ¶
func (s *BybitClientRequest) GetOptionClosedPosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOrderBookInfo ¶
func (s *BybitClientRequest) GetOrderBookInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOrderHistory ¶
func (s *BybitClientRequest) GetOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetOrderPriceLimit ¶
func (s *BybitClientRequest) GetOrderPriceLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPositionList ¶
func (s *BybitClientRequest) GetPositionList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeClosedPnl ¶
func (s *BybitClientRequest) GetPreUpgradeClosedPnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeOptionDeliveryRecord ¶
func (s *BybitClientRequest) GetPreUpgradeOptionDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeOrderHistory ¶
func (s *BybitClientRequest) GetPreUpgradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeTradeHistory ¶
func (s *BybitClientRequest) GetPreUpgradeTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeTransactionLog ¶
func (s *BybitClientRequest) GetPreUpgradeTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPreUpgradeUsdcSettlement ¶
func (s *BybitClientRequest) GetPreUpgradeUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPremiumIndexPriceKline ¶
func (s *BybitClientRequest) GetPremiumIndexPriceKline(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetPublicRecentTrades ¶
func (s *BybitClientRequest) GetPublicRecentTrades(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSelfMarketProtectionGroup ¶
func (s *BybitClientRequest) GetSelfMarketProtectionGroup(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetServerTime ¶
func (s *BybitClientRequest) GetServerTime(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSingleCoinsBalance ¶
func (s *BybitClientRequest) GetSingleCoinsBalance(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpotBorrowQuota ¶
func (s *BybitClientRequest) GetSpotBorrowQuota(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpotMarginBorrowCoin
deprecated
func (s *BybitClientRequest) GetSpotMarginBorrowCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetSpotMarginBorrowCoin is deprecated.
func (*BybitClientRequest) GetSpotMarginBorrowOrders
deprecated
func (s *BybitClientRequest) GetSpotMarginBorrowOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetSpotMarginBorrowOrders is deprecated.
func (*BybitClientRequest) GetSpotMarginCoin
deprecated
func (s *BybitClientRequest) GetSpotMarginCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetSpotMarginCoin is deprecated.
func (*BybitClientRequest) GetSpotMarginData ¶
func (s *BybitClientRequest) GetSpotMarginData(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpotMarginInterests ¶
func (s *BybitClientRequest) GetSpotMarginInterests(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpotMarginLoanAccountInfo
deprecated
func (s *BybitClientRequest) GetSpotMarginLoanAccountInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetSpotMarginLoanAccountInfo is deprecated.
func (*BybitClientRequest) GetSpotMarginRepaymentOrders
deprecated
func (s *BybitClientRequest) GetSpotMarginRepaymentOrders(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: GetSpotMarginRepaymentOrders is deprecated.
func (*BybitClientRequest) GetSpotMarginState ¶
func (s *BybitClientRequest) GetSpotMarginState(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadRecentTrade ¶
func (s *BybitClientRequest) GetSpreadRecentTrade(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadTradeHistory ¶
func (s *BybitClientRequest) GetSpreadTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadTradeInstrumentsInfo ¶
func (s *BybitClientRequest) GetSpreadTradeInstrumentsInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadTradeOrderBook ¶
func (s *BybitClientRequest) GetSpreadTradeOrderBook(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadTradeOrderHistory ¶
func (s *BybitClientRequest) GetSpreadTradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSpreadTradeTickers ¶
func (s *BybitClientRequest) GetSpreadTradeTickers(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubAccDepositAddress ¶
func (s *BybitClientRequest) GetSubAccDepositAddress(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubAccUids ¶
func (s *BybitClientRequest) GetSubAccUids(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubMemberDepositRecords ¶
func (s *BybitClientRequest) GetSubMemberDepositRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubUidApiKeysInfo ¶
func (s *BybitClientRequest) GetSubUidApiKeysInfo(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubUidList ¶
func (s *BybitClientRequest) GetSubUidList(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetSubUidListUnlimited ¶
func (s *BybitClientRequest) GetSubUidListUnlimited(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetTieredCollateralData ¶
func (s *BybitClientRequest) GetTieredCollateralData(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetTradeHistory ¶
func (s *BybitClientRequest) GetTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetTransactionLog ¶
func (s *BybitClientRequest) GetTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetTransferableAmount ¶
func (s *BybitClientRequest) GetTransferableAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetTransferableCoin ¶
func (s *BybitClientRequest) GetTransferableCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetUidWalletType ¶
func (s *BybitClientRequest) GetUidWalletType(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetUniversalTransferRecords ¶
func (s *BybitClientRequest) GetUniversalTransferRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetUsdcSettlement ¶
func (s *BybitClientRequest) GetUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetWithdrawalAmount ¶
func (s *BybitClientRequest) GetWithdrawalAmount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) GetWithdrawalRecords ¶
func (s *BybitClientRequest) GetWithdrawalRecords(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ModifyMasterAPIKey ¶
func (s *BybitClientRequest) ModifyMasterAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ModifySubAPIKey ¶
func (s *BybitClientRequest) ModifySubAPIKey(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) MovePosition ¶
func (s *BybitClientRequest) MovePosition(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) PlaceBatchOrder ¶
func (s *BybitClientRequest) PlaceBatchOrder(ctx context.Context, opts ...RequestOption) (res *models.BatchOrderServerResponse, err error)
func (*BybitClientRequest) PlaceOrder ¶
func (s *BybitClientRequest) PlaceOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) PlacePreCheckOrder ¶
func (s *BybitClientRequest) PlacePreCheckOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) PlaceSpreadTradeOrder ¶
func (s *BybitClientRequest) PlaceSpreadTradeOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) PurchaseLeverageToken
deprecated
func (s *BybitClientRequest) PurchaseLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: PurchaseLeverageToken is deprecated.
func (*BybitClientRequest) QueryBrokerVoucherSpec ¶
func (s *BybitClientRequest) QueryBrokerVoucherSpec(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Broker Reward
func (*BybitClientRequest) QueryDistributedBrokerVoucher ¶
func (s *BybitClientRequest) QueryDistributedBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RedeemEarnOrder ¶
func (s *BybitClientRequest) RedeemEarnOrder(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RedeemLeverageToken
deprecated
func (s *BybitClientRequest) RedeemLeverageToken(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: RedeemLeverageToken is deprecated.
func (*BybitClientRequest) RepayCryptoLoan
deprecated
func (s *BybitClientRequest) RepayCryptoLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: RepayCryptoLoan is deprecated.
func (*BybitClientRequest) RepayFixedLoan ¶
func (s *BybitClientRequest) RepayFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RepayFlexibleLoan ¶
func (s *BybitClientRequest) RepayFlexibleLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RepayLiability ¶
func (s *BybitClientRequest) RepayLiability(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RepaySpotMarginLoan
deprecated
func (s *BybitClientRequest) RepaySpotMarginLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: RepaySpotMarginLoan is deprecated.
func (*BybitClientRequest) RequestConvertQuote ¶
func (s *BybitClientRequest) RequestConvertQuote(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) RequestTestFund ¶
func (s *BybitClientRequest) RequestTestFund(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ResetMarketMakerProtection ¶
func (s *BybitClientRequest) ResetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetCollateralCoin ¶
func (s *BybitClientRequest) SetCollateralCoin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetDepositAccount ¶
func (s *BybitClientRequest) SetDepositAccount(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetDisconnectCancelAll ¶
func (s *BybitClientRequest) SetDisconnectCancelAll(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetMarginMode ¶
func (s *BybitClientRequest) SetMarginMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetMarketMakerProtection ¶
func (s *BybitClientRequest) SetMarketMakerProtection(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetPositionAutoMargin ¶
func (s *BybitClientRequest) SetPositionAutoMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetPositionLeverage ¶
func (s *BybitClientRequest) SetPositionLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetPositionRiskLimit
deprecated
func (s *BybitClientRequest) SetPositionRiskLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: SetPositionRiskLimit is deprecated. Since bybit has launched auto risk limit depends on current leverage
func (*BybitClientRequest) SetPositionTpslMode
deprecated
func (s *BybitClientRequest) SetPositionTpslMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
Deprecated: SetPositionTpslMode is deprecated. now tpsl is based on order level
func (*BybitClientRequest) SetPositionTradingStop ¶
func (s *BybitClientRequest) SetPositionTradingStop(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetSpotHedgeMode ¶
func (s *BybitClientRequest) SetSpotHedgeMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SetSpotMarginLeverage ¶
func (s *BybitClientRequest) SetSpotMarginLeverage(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SupplyFixedLoan ¶
func (s *BybitClientRequest) SupplyFixedLoan(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SwitchPositionMargin ¶
func (s *BybitClientRequest) SwitchPositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) SwitchPositionMode ¶
func (s *BybitClientRequest) SwitchPositionMode(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) ToggleSpotMarginTrade ¶
func (s *BybitClientRequest) ToggleSpotMarginTrade(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) UpdatePositionMargin ¶
func (s *BybitClientRequest) UpdatePositionMargin(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*BybitClientRequest) UpgradeToUTA ¶
func (s *BybitClientRequest) UpgradeToUTA(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
type Client ¶
type Client struct { APIKey string APISecret string BaseURL string HTTPClient *http.Client Debug bool Logger *log.Logger ProxyURL string // contains filtered or unexported fields }
Client define API client
func NewBybitHttpClient ¶
func NewBybitHttpClient(apiKey string, APISecret string, options ...ClientOption) *Client
NewBybitHttpClient NewClient Create client function for initialising new Bybit client
func (*Client) NewClassicalBybitServiceNoParams ¶
func (c *Client) NewClassicalBybitServiceNoParams() *BybitClientRequest
func (*Client) NewClassicalBybitServiceWithParams ¶
func (c *Client) NewClassicalBybitServiceWithParams(params map[string]interface{}) *BybitClientRequest
func (*Client) NewPlaceOrderService ¶
NewPlaceOrderService quick order endpoint
func (*Client) NewUtaBybitServiceNoParams ¶
func (c *Client) NewUtaBybitServiceNoParams() *BybitClientRequest
func (*Client) NewUtaBybitServiceWithParams ¶
func (c *Client) NewUtaBybitServiceWithParams(params map[string]interface{}) *BybitClientRequest
type ClientOption ¶
type ClientOption func(*Client)
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
WithBaseURL is a client option to set the base URL of the Bybit HTTP client.
func WithProxyURL ¶
func WithProxyURL(proxyURL string) ClientOption
WithProxyURL is a client option to set the proxy url
type MessageHandler ¶
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) CloseOnTrigger ¶
func (*Order) Do ¶
func (order *Order) Do(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error)
func (*Order) IsLeverage ¶
func (*Order) MarketUnit ¶
func (*Order) OrderFilter ¶
func (*Order) OrderLinkId ¶
func (*Order) PositionIdx ¶
func (*Order) ReduceOnly ¶
func (*Order) SlLimitPrice ¶
func (*Order) SlOrderType ¶
func (*Order) SlTriggerBy ¶
func (*Order) SlippageTolerance ¶
func (*Order) SlippageToleranceType ¶
func (*Order) TakeProfit ¶
func (*Order) TimeInForce ¶
func (*Order) TpLimitPrice ¶
func (*Order) TpOrderType ¶
func (*Order) TpTriggerBy ¶
func (*Order) TriggerDirection ¶
func (*Order) TriggerPrice ¶
type RequestOption ¶
type RequestOption func(*request)
RequestOption define option type for request
func WithRecvWindow ¶
func WithRecvWindow(recvWindow string) RequestOption
WithRecvWindow Append `WithRecvWindow(insert_recvWindow)` to request to modify the default recvWindow value
type ServerResponse ¶
type ServerResponse struct { RetCode int `json:"retCode"` RetMsg string `json:"retMsg"` Result interface{} `json:"result"` RetExtInfo struct{} `json:"retExtInfo"` Time int64 `json:"time"` }
func GetServerResponse ¶
func GetServerResponse(err error, data []byte) (*ServerResponse, error)
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func NewBybitPrivateWebSocket ¶
func NewBybitPrivateWebSocket(url, apiKey, apiSecret string, handler MessageHandler, options ...WebsocketOption) *WebSocket
func NewBybitPublicWebSocket ¶
func NewBybitPublicWebSocket(url string, handler MessageHandler) *WebSocket
func (*WebSocket) Disconnect ¶
func (*WebSocket) SendRequest ¶
func (b *WebSocket) SendRequest(op string, args map[string]interface{}, headers map[string]string, reqId ...string) (*WebSocket, error)
SendRequest sendRequest sends a custom request over the WebSocket connection.
func (*WebSocket) SendSubscription ¶
func (*WebSocket) SendTradeRequest ¶
func (*WebSocket) SetMessageHandler ¶
func (b *WebSocket) SetMessageHandler(handler MessageHandler)
type WebsocketOption ¶
type WebsocketOption func(*WebSocket)
func WithMaxAliveTime ¶
func WithMaxAliveTime(maxAliveTime string) WebsocketOption
func WithPingInterval ¶
func WithPingInterval(pingInterval int) WebsocketOption