import { APIResponseV3, APIResponseV3WithTime, AccountCoinBalanceV5, AccountInfoV5, AccountMarginModeV5, AccountOrderV5, AccountTypeV5, AddOrReduceMarginParamsV5, AddOrReduceMarginResultV5, AllCoinsBalanceV5, AllowedDepositCoinInfoV5, AmendOrderParamsV5, ApiKeyInfoV5, AssetInfoV5, BatchAmendOrderParamsV5, BatchAmendOrderResultV5, BatchCancelOrderParamsV5, BatchCancelOrderResultV5, BatchCreateOrderResultV5, BatchOrderParamsV5, BatchOrdersResponseV5, BorrowHistoryRecordV5, CancelAllOrdersParamsV5, CancelOrderParamsV5, CategoryCursorListV5, CategoryListV5, CategorySymbolListV5, CategoryV5, ClosedPnLV5, CoinExchangeRecordV5, CoinGreeksV5, CoinInfoV5, CollateralInfoV5, CreateSubApiKeyParamsV5, CreateSubApiKeyResultV5, CreateSubMemberParamsV5, CreateSubMemberResultV5, CursorListV5, CursorRowsV5, DeleteSubMemberParamsV5, DeliveryPriceV5, DeliveryRecordV5, DepositAddressResultV5, DepositRecordV5, ExecutionV5, FeeRateV5, FundingRateHistoryResponseV5, GetAccountCoinBalanceParamsV5, GetAccountHistoricOrdersParamsV5, GetAccountOrdersParamsV5, GetAllCoinsBalanceParamsV5, GetAllowedDepositCoinInfoParamsV5, GetAssetInfoParamsV5, GetBorrowHistoryParamsV5, GetClosedPnLParamsV5, GetCoinExchangeRecordParamsV5, GetDeliveryPriceParamsV5, GetDeliveryRecordParamsV5, GetDepositRecordParamsV5, GetExecutionListParamsV5, GetFeeRateParamsV5, GetFundingRateHistoryParamsV5, GetHistoricalVolatilityParamsV5, GetIndexPriceKlineParamsV5, GetInstrumentsInfoParamsV5, GetInsuranceParamsV5, GetInternalDepositRecordParamsV5, GetInternalTransferParamsV5, GetKlineParamsV5, GetMarkPriceKlineParamsV5, GetOpenInterestParamsV5, GetOptionDeliveryPriceParamsV5, GetOrderbookParamsV5, GetPreUpgradeClosedPnlParamsV5, GetPreUpgradeOrderHistoryParamsV5, GetPreUpgradeTradeHistoryParamsV5, GetPremiumIndexPriceKlineParamsV5, GetPublicTradingHistoryParamsV5, GetRiskLimitParamsV5, GetSettlementRecordParamsV5, GetSpotLeveragedTokenOrderHistoryParamsV5, GetSubAccountDepositRecordParamsV5, GetTickersParamsV5, GetTransactionLogParamsV5, GetUniversalTransferRecordsParamsV5, GetWalletBalanceParamsV5, GetWithdrawalRecordsParamsV5, HistoricalVolatilityV5, InstrumentInfoResponseV5, InsuranceResponseV5, InternalDepositRecordV5, InternalTransferRecordV5, LeverageTokenInfoV5, LeveragedTokenMarketResultV5, MMPModifyParamsV5, MMPStateV5, OHLCKlineV5, OHLCVKlineV5, OpenInterestResponseV5, OptionDeliveryPriceV5, OrderParamsV5, OrderResultV5, OrderSideV5, OrderbookResponseV5, PositionInfoParamsV5, PositionV5, PublicTradeV5, PurchaseSpotLeveragedTokenParamsV5, PurchaseSpotLeveragedTokenResultV5, RedeemSpotLeveragedTokenParamsV5, RedeemSpotLeveragedTokenResultV5, RepayLiabilityParamsV5, RepayLiabilityResultV5, RiskLimitV5, SetAutoAddMarginParamsV5, SetCollateralCoinParamsV5, SetLeverageParamsV5, SetRiskLimitParamsV5, SetRiskLimitResultV5, SetTPSLModeParamsV5, SetTradingStopParamsV5, SettlementRecordV5, SpotBorrowCheckResultV5, SpotLeveragedTokenOrderHistoryV5, SubMemberV5, SwitchIsolatedMarginParamsV5, SwitchPositionModeParamsV5, TPSLModeV5, TickerLinearInverseV5, TickerOptionV5, TickerSpotV5, TransactionLogV5, UnifiedAccountUpgradeResultV5, UniversalTransferParamsV5, UniversalTransferRecordV5, UpdateApiKeyParamsV5, UpdateApiKeyResultV5, WalletBalanceV5, WithdrawParamsV5, WithdrawalRecordV5 } from './types'; import BaseRestClient from './util/BaseRestClient'; /** * REST API client for V5 REST APIs * * https://bybit-exchange.github.io/docs/v5/intro */ export declare class RestClientV5 extends BaseRestClient { getClientType(): "v3"; fetchServerTime(): Promise; getServerTime(): Promise>; /** * ****** Market APIs * */ /** * Query the kline data. Charts are returned in groups based on the requested interval. * * Covers: Spot / Linear contract / Inverse contract */ getKline(params: GetKlineParamsV5): Promise>>; /** * Query the mark price kline data. Charts are returned in groups based on the requested interval. * * Covers: Linear contract / Inverse contract */ getMarkPriceKline(params: GetMarkPriceKlineParamsV5): Promise>>; /** * Query the index price kline data. Charts are returned in groups based on the requested interval. * * Covers: Linear contract / Inverse contract */ getIndexPriceKline(params: GetIndexPriceKlineParamsV5): Promise>>; /** * Retrieve the premium index price kline data. Charts are returned in groups based on the requested interval. * * Covers: Linear contract */ getPremiumIndexPriceKline(params: GetPremiumIndexPriceKlineParamsV5): Promise>>; /** * Query a list of instruments of online trading pair. * * Covers: Spot / Linear contract / Inverse contract / Option * * Note: Spot does not support pagination, so limit & cursor are invalid. */ getInstrumentsInfo(params: GetInstrumentsInfoParamsV5 & { category: C; }): Promise>>; /** * Query orderbook data * * Covers: Spot / Linear contract / Inverse contract / Option */ getOrderbook(params: GetOrderbookParamsV5): Promise>; getTickers(params: GetTickersParamsV5<'linear' | 'inverse'>): Promise>>; getTickers(params: GetTickersParamsV5<'option'>): Promise>>; getTickers(params: GetTickersParamsV5<'spot'>): Promise>>; /** * Query historical funding rate. Each symbol has a different funding interval. * * Covers: Linear contract / Inverse perpetual */ getFundingRateHistory(params: GetFundingRateHistoryParamsV5): Promise>>; /** * Query recent public trading data in Bybit. * * Covers: Spot / Linear contract / Inverse contract / Option */ getPublicTradingHistory(params: GetPublicTradingHistoryParamsV5): Promise>>; /** * Get open interest of each symbol. * * Covers: Linear contract / Inverse contract */ getOpenInterest(params: GetOpenInterestParamsV5): Promise>; /** * Query option historical volatility * Covers: Option */ getHistoricalVolatility(params: GetHistoricalVolatilityParamsV5): Promise>>; /** * Query Bybit insurance pool data (BTC/USDT/USDC etc). The data is updated every 24 hours. */ getInsurance(params?: GetInsuranceParamsV5): Promise>; /** * Query risk limit of futures * * Covers: Linear contract / Inverse contract */ getRiskLimit(params?: GetRiskLimitParamsV5): Promise>>; /** * Get the delivery price for option * * Covers: Option * * @deprecated use getDeliveryPrice() instead */ getOptionDeliveryPrice(params: GetOptionDeliveryPriceParamsV5): Promise>>; /** * Get the delivery price of Inverse futures, USDC futures and Options * * Covers: USDC futures / Inverse futures / Option */ getDeliveryPrice(params: GetDeliveryPriceParamsV5): Promise>>; /** * ****** Trade APIs * */ submitOrder(params: OrderParamsV5): Promise>; amendOrder(params: AmendOrderParamsV5): Promise>; cancelOrder(params: CancelOrderParamsV5): Promise>; /** * Query unfilled or partially filled orders in real-time. To query older order records, please use the order history interface. */ getActiveOrders(params: GetAccountOrdersParamsV5): Promise>>; cancelAllOrders(params: CancelAllOrdersParamsV5): Promise>; /** * Query order history. As order creation/cancellation is asynchronous, the data returned from this endpoint may delay. * * If you want to get real-time order information, you could query this endpoint or rely on the websocket stream (recommended). */ getHistoricOrders(params: GetAccountHistoricOrdersParamsV5): Promise>>; /** * This endpoint allows you to place more than one order in a single request. * Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro) * * Make sure you have sufficient funds in your account when placing an order. * Once an order is placed, according to the funds required by the order, * the funds in your account will be frozen by the corresponding amount during the life cycle of the order. * * A maximum of 20 orders can be placed per request. The returned data list is divided into two lists. * The first list indicates whether or not the order creation was successful and the second list details the created order information. * The structure of the two lists are completely consistent. */ batchSubmitOrders(category: 'option' | 'linear', orders: BatchOrderParamsV5[]): Promise>>; /** * This endpoint allows you to amend more than one open order in a single request. * Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro) * * You can modify unfilled or partially filled orders. Conditional orders are not supported. * * A maximum of 20 orders can be amended per request. */ batchAmendOrders(category: 'option' | 'linear', orders: BatchAmendOrderParamsV5[]): Promise>>; /** * This endpoint allows you to cancel more than one open order in a single request. * Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro) * * You must specify orderId or orderLinkId. If orderId and orderLinkId is not matched, the system will process orderId first. * * You can cancel unfilled or partially filled orders. A maximum of 20 orders can be cancelled per request. */ batchCancelOrders(category: 'option' | 'linear', orders: BatchCancelOrderParamsV5[]): Promise>>; /** * Query the qty and amount of borrowable coins in spot account. * * Covers: Spot (Unified Account) */ getSpotBorrowCheck(symbol: string, side: OrderSideV5): Promise>; /** * This endpoint allows you to set the disconnection protect time window. Covers: option (unified account). * * If you need to turn it on/off, you can contact your client manager for consultation and application. * The default time window is 10 seconds. */ setDisconnectCancelAllWindow(category: 'option', timeWindow: number): Promise>; /** * ****** Position APIs * */ /** * Query real-time position data, such as position size, cumulative realizedPNL. * * 0: cross margin. 1: isolated margin * * Unified account covers: Linear contract / Options * * Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures * * Note: this will give a 404 error if you query the `option` category if your account is not unified */ getPositionInfo(params: PositionInfoParamsV5): Promise>>; /** * Set the leverage * * Unified account covers: Linear contract * * Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures * * Note: Under one-way mode, buyLeverage must be the same as sellLeverage */ setLeverage(params: SetLeverageParamsV5): Promise>; /** * Select cross margin mode or isolated margin mode. * 0: cross margin. 1: isolated margin * * Covers: USDT perpetual (Normal account) / Inverse contract (Normal account). * * Switching margin modes will cause orders in progress to be cancelled. * Please make sure that there are no open orders before you switch margin modes. */ switchIsolatedMargin(params: SwitchIsolatedMarginParamsV5): Promise>; /** * This endpoint sets the take profit/stop loss (TP/SL) mode to full or partial. * * Unified account covers: Linear contract; normal account covers: USDT perpetual, inverse perpetual, inverse futures. * * For partial TP/SL mode, you can set the TP/SL size smaller than position size. */ setTPSLMode(params: SetTPSLModeParamsV5): Promise>; /** * Switches the position mode for USDT perpetual and Inverse futures. * * If you are in one-way Mode, you can only open one position on Buy or Sell side. * * If you are in hedge mode, you can open both Buy and Sell side positions simultaneously. * * Position mode. 0: Merged Single. 3: Both Sides. */ switchPositionMode(params: SwitchPositionModeParamsV5): Promise>; /** * The risk limit will limit the maximum position value you can hold under different margin requirements. * If you want to hold a bigger position size, you need more margin. * * This interface can set the risk limit of a single position. * If the order exceeds the current risk limit when placing an order, it will be rejected. */ setRiskLimit(params: SetRiskLimitParamsV5): Promise>; /** * This endpoint allows you to set the take profit, stop loss or trailing stop for a position. * Passing these parameters will create conditional orders by the system internally. * * The system will cancel these orders if the position is closed, and adjust the qty according to the size of the open position. * * Unified account covers: Linear contract. * Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures. */ setTradingStop(params: SetTradingStopParamsV5): Promise>; /** * This endpoint allows you to turn on/off auto-add-margin for an isolated margin position. * * Covers: USDT perpetual (Normal Account). */ setAutoAddMargin(params: SetAutoAddMarginParamsV5): Promise>; /** * Manually add or reduce margin for isolated margin position * * Unified account covers: USDT perpetual / USDC perpetual / USDC futures / Inverse contract * Normal account covers: USDT perpetual / Inverse contract */ addOrReduceMargin(params: AddOrReduceMarginParamsV5): Promise>; /** * Query users' execution records, sorted by execTime in descending order * * Unified account covers: Spot / Linear contract / Options * Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures */ getExecutionList(params: GetExecutionListParamsV5): Promise>>; /** * Query user's closed profit and loss records. The results are sorted by createdTime in descending order. * * Unified account covers: Linear contract * Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures */ getClosedPnL(params: GetClosedPnLParamsV5): Promise>>; /** * ****** Pre-upgrade APIs * */ /** * Get those orders which occurred before you upgrade the account to Unified account. * * For now, it only supports to query USDT perpetual, USDC perpetual, Inverse perpetual and futures. * * - can get all status in 7 days * - can only get filled orders beyond 7 days */ getPreUpgradeOrderHistory(params: GetPreUpgradeOrderHistoryParamsV5): Promise>>; /** * Get users' execution records which occurred before you upgrade the account to Unified account, sorted by execTime in descending order * * For now, it only supports to query USDT perpetual, Inverse perpetual and futures. * * - You may have multiple executions in a single order. * - You can query by symbol, baseCoin, orderId and orderLinkId, and if you pass multiple params, * the system will process them according to this priority: orderId > orderLinkId > symbol > baseCoin. */ getPreUpgradeTradeHistory(params: GetPreUpgradeTradeHistoryParamsV5): Promise>>; /** * Query user's closed profit and loss records. The results are sorted by createdTime in descending order. * * For now, it only supports to query USDT perpetual, Inverse perpetual and futures. */ getPreUpgradeClosedPnl(params: GetPreUpgradeClosedPnlParamsV5): Promise>>; /** * ****** Account APIs * */ /** * Obtain wallet balance, query asset information of each currency, and account risk rate information under unified margin mode. * * By default, currency information with assets or liabilities of 0 is not returned. */ getWalletBalance(params: GetWalletBalanceParamsV5): Promise>; /** * Upgrade to unified account. * * Banned/OTC loan/Net asset unsatisfying/Express path users cannot upgrade the account to Unified Account for now. */ upgradeToUnifiedAccount(): Promise>; /** * Get interest records, sorted in reverse order of creation time. * * Unified account */ getBorrowHistory(params?: GetBorrowHistoryParamsV5): Promise>>; /** * You can manually repay the liabilities of Unified account * Applicable: Unified Account * Permission: USDC Contracts * * - Input the specific coin: repay the liability of this coin in particular * - No coin specified: repay the liability of all coins */ repayLiability(params?: RepayLiabilityParamsV5): Promise>>; /** * You can decide whether the assets in the Unified account needs to be collateral coins. */ setCollateralCoin(params: SetCollateralCoinParamsV5): Promise>; batchSetCollateralCoin(params: { request: SetCollateralCoinParamsV5[]; }): Promise>; /** * Get the collateral information of the current unified margin account, including loan interest rate, * loanable amount, collateral conversion rate, whether it can be mortgaged as margin, etc. */ getCollateralInfo(currency?: string): Promise>; /** * Get current account Greeks information */ getCoinGreeks(baseCoin?: string): Promise>; /** * Get the trading fee rate. * Covers: Spot / USDT perpetual / Inverse perpetual / Inverse futures / Options */ getFeeRate(params: GetFeeRateParamsV5): Promise>>; /** * Query the margin mode and the upgraded status of account */ getAccountInfo(): Promise>; /** * Query transaction logs in Unified account. */ getTransactionLog(params?: GetTransactionLogParamsV5): Promise>>; /** * Default is regular margin mode. * * This mode is valid for USDT Perp, USDC Perp and USDC Option. */ setMarginMode(marginMode: AccountMarginModeV5): Promise>; /** * Configure Market Maker Protection (MMP) */ setMMP(params: MMPModifyParamsV5): Promise>; /** * Once the mmp triggered, you can unfreeze the account via this endpoint */ resetMMP(baseCoin: string): Promise>; /** * Get MMP State */ getMMPState(baseCoin: string): Promise>; /** * ****** Asset APIs * */ /** * Query the coin exchange records. * * CAUTION: You may experience long delays with this endpoint. */ getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise>; /** * Query option delivery records, sorted by deliveryTime in descending order. * * Covers: Option */ getDeliveryRecord(params: GetDeliveryRecordParamsV5): Promise>>; /** * Query session settlement records of USDC perpetual * * Covers: Linear contract (USDC Perpetual only, Unified Account) */ getSettlementRecords(params: GetSettlementRecordParamsV5): Promise>>; /** * Query asset information. * * INFO * For now, it can query SPOT only. */ getAssetInfo(params: GetAssetInfoParamsV5): Promise>; /** * Query all coin balances of all account types under the master account and sub accounts. * * It is not allowed to get the master account coin balance via sub account API key. */ getAllCoinsBalance(params: GetAllCoinsBalanceParamsV5): Promise>; /** * Query the balance of a specific coin in a specific account type. Supports querying sub UID's balance. * * CAUTION: Can query by the master UID's api key only. */ getCoinBalance(params: GetAccountCoinBalanceParamsV5): Promise>; /** * Query the transferable coin list between each account type. */ getTransferableCoinList(fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise>; /** * Create the internal transfer between different account types under the same UID. * Each account type has its own acceptable coins, e.g, you cannot transfer USDC from SPOT to CONTRACT. * * Please refer to the getTransferableCoinList() API to find out more. */ createInternalTransfer(transferId: string, coin: string, amount: string, fromAccountType: AccountTypeV5, toAccountType: AccountTypeV5): Promise>; /** * Query the internal transfer records between different account types under the same UID. */ getInternalTransferRecords(params?: GetInternalTransferParamsV5): Promise>>; /** * Query the sub UIDs under a main UID * * CAUTION: Can query by the master UID's api key only */ getSubUID(): Promise>; /** * Enable Universal Transfer for Sub UID * * Use this endpoint to enable a subaccount to take part in a universal transfer. * It is a one-time switch which, once thrown, enables a subaccount permanently. * If not set, your subaccount cannot use universal transfers. */ enableUniversalTransferForSubUIDs(subMemberIds: string[]): Promise>; /** * Transfer between sub-sub or main-sub. Please make sure you have enabled universal transfer on your sub UID in advance. */ createUniversalTransfer(params: UniversalTransferParamsV5): Promise>; /** * Query universal transfer records * * CAUTION * Can query by the master UID's API key only */ getUniversalTransferRecords(params?: GetUniversalTransferRecordsParamsV5): Promise>>; /** * Query allowed deposit coin information. * To find out paired chain of coin, please refer to the coin info api. */ getAllowedDepositCoinInfo(params?: GetAllowedDepositCoinInfoParamsV5): Promise>; /** * Set auto transfer account after deposit. The same function as the setting for Deposit on web GUI */ setDepositAccount(params: { accountType: AccountTypeV5; }): Promise>; /** * Query deposit records. * * TIP * endTime - startTime should be less than 30 days. Query last 30 days records by default. * * Can use main or sub UID api key to query deposit records respectively. */ getDepositRecords(params?: GetDepositRecordParamsV5): Promise>; /** * Query subaccount's deposit records by MAIN UID's API key. * * TIP: Query deposit records of SPOT only * endTime - startTime should be less than 30 days. * Queries for the last 30 days worth of records by default. */ getSubAccountDepositRecords(params: GetSubAccountDepositRecordParamsV5): Promise>; /** * Get Internal Deposit Records (across Bybit) * Query deposit records through Bybit platform * * RULES * The maximum difference between the start time and the end time is 30 days. * Support to get deposit records by Master or Sub Member Api Key */ getInternalDepositRecords(params?: GetInternalDepositRecordParamsV5): Promise>; /** * Query the deposit address information of MASTER account. */ getMasterDepositAddress(coin: string, chainType?: string): Promise>; /** * Query the deposit address information of SUB account. */ getSubDepositAddress(coin: string, chainType: string, subMemberId: string): Promise>; /** * Query the deposit address information of SUB account. * * CAUTION * Can use master UID's api key only */ querySubMemberAddress(coin: string, chainType: string, subMemberId: string): Promise>; /** * Query coin information, including chain information, withdraw and deposit status. */ getCoinInfo(coin?: string): Promise>; /** * Query withdrawal records. */ getWithdrawalRecords(params?: GetWithdrawalRecordsParamsV5): Promise>>; /** * Query withdrawable amount. */ getWithdrawableAmount(params: { coin: string; }): Promise>; /** * Withdraw assets from the SPOT account. * * CAUTION: Make sure you have whitelisted your wallet address before calling this endpoint. * * You can make an off-chain transfer if the target wallet address is from Bybit. This means that no blockchain fee will be charged. */ submitWithdrawal(params: WithdrawParamsV5): Promise>; /** * Cancel the withdrawal * * CAUTION: Can query by the master UID's api key only */ cancelWithdrawal(id: string): Promise>; /** * ****** User APIs * */ /** * Create a new sub user id. Use master user's api key only. * * The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" */ createSubMember(params: CreateSubMemberParamsV5): Promise>; /** * To create new API key for those newly created sub UID. Use master user's api key only. * * TIP: The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" */ createSubUIDAPIKey(params: CreateSubApiKeyParamsV5): Promise>; /** * This endpoint allows you to get a list of all sub UID of master account. */ getSubUIDList(): Promise>; /** * Froze sub uid. Use master user's api key only. * * TIP: The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" */ setSubUIDFrozenState(subuid: number, frozen: 0 | 1): Promise>; /** * Get the information of the api key. Use the api key pending to be checked to call the endpoint. * Both master and sub user's api key are applicable. * * TIP: Any permission can access this endpoint. */ getQueryApiKey(): Promise>; /** * Modify the settings of a master API key. Use the API key pending to be modified to call the endpoint. Use master user's API key only. * * TIP: The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" */ updateMasterApiKey(params: UpdateApiKeyParamsV5): Promise>; /** * This endpoint modifies the settings of a sub API key. * Use the API key pending to be modified to call the endpoint. * Only the API key that calls this interface can be modified. * * The API key must own "Account Transfer" permission to be allowed to call this API endpoint. */ updateSubApiKey(params: UpdateApiKeyParamsV5): Promise>; /** * Delete the api key of master account. Use the api key pending to be delete to call the endpoint. Use master user's api key only. * * TIP: * The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" * * DANGER: BE CAREFUL! The API key used to call this interface will be invalid immediately. */ deleteMasterApiKey(): Promise>; /** * Delete the api key of sub account. Use the api key pending to be delete to call the endpoint. Use sub user's api key only. * * TIP: * The API key must have one of the permissions to be allowed to call the following API endpoint. * - sub API key: "Account Transfer" * * DANGER: BE CAREFUL! The API key used to call this interface will be invalid immediately. */ deleteSubApiKey(): Promise>; /** * Delete a sub UID. Before deleting the UID, please make sure there are no assets. * * TIP: * The API key must have one of the permissions to be allowed to call the following API endpoint. * - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal" */ deleteSubMember(params: DeleteSubMemberParamsV5): Promise>; /** * ****** Spot Leverage Token APIs * */ /** * Query leverage token information */ getLeveragedTokenInfo(ltCoin?: string): Promise>; /** * Get leverage token market information. */ getLeveragedTokenMarket(ltCoin: string): Promise>; /** * This endpoint allows you to purchase a leveraged token with a specified amount. */ purchaseSpotLeveragedToken(params: PurchaseSpotLeveragedTokenParamsV5): Promise>; /** * Redeem leveraged token. */ redeemSpotLeveragedToken(params: RedeemSpotLeveragedTokenParamsV5): Promise>; /** * Get purchase or redemption history */ getSpotLeveragedTokenOrderHistory(params?: GetSpotLeveragedTokenOrderHistoryParamsV5): Promise>; /** * ****** Spot Margin Trade APIs (UTA) * */ /** * Turn spot margin trade on / off in your UTA account. * * CAUTION * Your account needs to turn on spot margin first. */ toggleSpotMarginTrade(spotMarginMode: '1' | '0'): Promise>; /** * Set the user's maximum leverage in spot cross margin. * CAUTION: Your account needs to enable spot margin first; i.e., you must have finished the quiz on web / app. */ setSpotMarginLeverage(leverage: string): Promise>; /** * ****** Spot Margin Trade APIs (Normal) * */ /** * Get Margin Coin Info */ getSpotMarginCoinInfo(coin?: string): Promise>; /** * Get Borrowable Coin Info */ getSpotMarginBorrowableCoinInfo(coin?: string): Promise>; /** * Get Interest & Quota */ getSpotMarginInterestAndQuota(coin: string): Promise>; /** * Get Loan Account Info */ getSpotMarginLoanAccountInfo(): Promise>; /** * Borrow */ spotMarginBorrow(params: { coin: string; qty: string; }): Promise>; /** * Repay */ spotMarginRepay(params: { coin: string; qty?: string; completeRepayment: 0 | 1; }): Promise>; /** * Get Borrow Order Detail */ getSpotMarginBorrowOrderDetail(params?: { startTime?: number; endTime?: number; coin?: string; status?: 0 | 1 | 2; limit?: number; }): Promise>; /** * Get Repayment Order Detail */ getSpotMarginRepaymentOrderDetail(params?: { startTime?: number; endTime?: number; coin?: string; limit?: number; }): Promise>; /** * Turn spot margin trade on / off in your NORMAL account. */ toggleSpotCrossMarginTrade(params: { switch: 1 | 0; }): Promise>; /** * ****** Institutional Lending * */ /** * Get Product Info */ getInstitutionalLendingProductInfo(productId?: string): Promise>; /** * Get Margin Coin Info */ getInstitutionalLendingMarginCoinInfo(productId?: string): Promise>; /** * Get Margin Coin Info With Conversion Rate */ getInstitutionalLendingMarginCoinInfoWithConversionRate(productId?: string): Promise>; /** * Get Loan Orders */ getInstitutionalLendingLoanOrders(params?: { orderId?: string; startTime?: number; endTime?: number; limit?: number; }): Promise>; /** * Get Repay Orders */ getInstitutionalLendingRepayOrders(params?: { startTime?: number; endTime?: number; limit?: number; }): Promise>; /** * Get LTV */ getInstitutionalLendingLTV(): Promise>; /** * Get LTV with Ladder Conversion Rate */ getInstitutionalLendingLTVWithLadderConversionRate(): Promise>; }