import { CreateSubAccountApiKeyRequestV3, CreateSubAccountRequestV3, DeleteSubAccountApiKeyRequestV3, FreezeSubAccountRequestV3, GetConvertRecordsRequestV3, GetDepositAddressRequestV3, GetDepositRecordsRequestV3, GetFeeRateRequestV3, GetFinancialRecordsRequestV3, GetFundingAssetsRequestV3, GetMaxTransferableRequestV3, GetOpenInterestLimitRequestV3, GetSubAccountApiKeysRequestV3, GetSubAccountListRequestV3, GetSubDepositAddressRequestV3, GetSubDepositRecordsRequestV3, GetSubTransferRecordsRequestV3, GetSubUnifiedAssetsRequestV3, GetTaxRecordsRequestV3, GetTransferableCoinsRequestV3, GetWithdrawRecordsRequestV3, RepayRequestV3, SetDepositAccountRequestV3, SetLeverageRequestV3, SubAccountTransferRequestV3, SwitchDeductRequestV3, TransferRequestV3, UpdateSubAccountApiKeyRequestV3, WithdrawRequestV3 } from './types/request/v3/account.js'; import { BrokerSubWithdrawalRequestV3, CreateBrokerSubAccountRequestV3, CreateBrokerSubApiKeyRequestV3, DeleteBrokerSubApiKeyRequestV3, GetBrokerAllSubDepositWithdrawalRequestV3, GetBrokerCommissionRequestV3, GetBrokerSubAccountListRequestV3, GetBrokerSubApiKeyRequestV3, GetBrokerSubDepositAddressRequestV3, ModifyBrokerSubAccountRequestV3, ModifyBrokerSubApiKeyRequestV3 } from './types/request/v3/broker.js'; import { BindUidRequestV3, GetEnsureCoinsRequestV3, GetLoanBorrowHistoryRequestV3, GetLoanBorrowOngoingRequestV3, GetLoanCoinsRequestV3, GetLoanInterestRequestV3, GetLoanOrderRequestV3, GetLoanPledgeRateHistoryRequestV3, GetLoanReducesRequestV3, GetLoanRepayHistoryRequestV3, GetLTVConvertRequestV3, GetProductInfosRequestV3, GetRepaidHistoryRequestV3, GetSymbolsRequestV3, GetTransferedRequestV3, LoanBorrowRequestV3, LoanRepayRequestV3, LoanRevisePledgeRequestV3 } from './types/request/v3/loan.js'; import { GetCandlesRequestV3, GetContractsOiRequestV3, GetCurrentFundingRateRequestV3, GetHistoryCandlesRequestV3, GetHistoryFundingRateRequestV3, GetIndexComponentsRequestV3, GetInstrumentsRequestV3, GetMarginLoansRequestV3, GetMarketFeeGroupRequestV3, GetMarketScoreWeightsRequestV3, GetOpenInterestRequestV3, GetOrderBookRequestV3, GetPositionTierRequestV3, GetPublicFillsRequestV3, GetRiskReserveRequestV3, GetTickersRequestV3 } from './types/request/v3/public.js'; import { CancelStrategyOrderRequestV3, GetHistoryStrategyOrdersRequestV3, GetUnfilledStrategyOrdersRequestV3, ModifyStrategyOrderRequestV3, PlaceStrategyOrderRequestV3 } from './types/request/v3/strategy.js'; import { BatchModifyOrderRequestV3, CancelAllOrdersRequestV3, CancelBatchOrdersRequestV3, CancelOrderRequestV3, CloseAllPositionsRequestV3, CountdownCancelAllRequestV3, GetCurrentPositionRequestV3, GetFillsRequestV3, GetHistoryOrdersRequestV3, GetMaxOpenAvailableRequestV3, GetOrderInfoRequestV3, GetPositionHistoryRequestV3, GetUnfilledOrdersRequestV3, ModifyOrderRequestV3, PlaceBatchOrdersRequestV3, PlaceOrderRequestV3 } from './types/request/v3/trade.js'; import { AccountAssetsV3, AccountSettingsV3, ConvertRecordV3, CreateSubAccountApiKeyResponseV3, CreateSubAccountResponseV3, DepositAddressV3, DepositRecordV3, FinancialRecordV3, FundingAssetV3, MaxTransferableV3, OpenInterestLimitV3, PaymentCoinV3, RepayableCoinV3, RepayResponseV3, SubAccountApiKeyV3, SubAccountV3, SubTransferRecordV3, SubUnifiedAssetV3, TaxRecordV3, TransferResponseV3, UpdateSubAccountApiKeyResponseV3, WithdrawRecordV3, WithdrawResponseV3 } from './types/response/v3/account.js'; import { BrokerCommissionRecordV3, BrokerSubDepositAddressV3, BrokerSubWithdrawalResponseV3, CreateBrokerSubAccountResponseV3, CreateBrokerSubApiKeyResponseV3, GetBrokerAllSubDepositWithdrawalResponseV3, GetBrokerSubAccountListResponseV3, GetBrokerSubApiKeyResponseV3, ModifyBrokerSubAccountResponseV3, ModifyBrokerSubApiKeyResponseV3 } from './types/response/v3/broker.js'; import { BindUidResponseV3, CoinInfoV3, GetLoanCoinsResponseV3, GetLoanDebtsResponseV3, GetLoanInterestResponseV3, LoanBorrowHistoryItemV3, LoanBorrowOngoingItemV3, LoanBorrowResponseV3, LoanOrderV3, LoanPledgeRateHistoryItemV3, LoanProductInfoV3, LoanReduceItemV3, LoanRepayHistoryItemV3, LoanRepayResponseV3, LoanRevisePledgeResponseV3, LoanSymbolsV3, LoanTransfersV3, LTVConvertResponseV3, RepaidHistoryItemV3 } from './types/response/v3/loan.js'; import { CandlestickV3, ContractOiV3, CurrentFundingRateV3, DiscountRateV3, HistoryFundingRateV3, IndexPriceComponentsV3, InstrumentV3, MarginLoanV3, MarketFeeGroupV3, MarketScoreWeightV3, OpenInterestV3, OrderBookV3, PositionTierV3, ProofOfReservesV3, PublicFillV3, RiskReserveV3, TickerV3 } from './types/response/v3/public.js'; import { ModifyStrategyOrderResponseV3, PlaceStrategyOrderResponseV3, StrategyOrderV3 } from './types/response/v3/strategy.js'; import { BatchModifyOrderResponseV3, CancelAllOrdersResponseV3, CancelBatchOrdersResponseV3, CancelOrderResponseV3, CloseAllPositionsResponseV3, CurrentPositionV3, FillV3, GetMaxOpenAvailableResponseV3, HistoryOrderV3, ModifyOrderResponseV3, OrderInfoV3, PlaceBatchOrdersResponseV3, PlaceOrderResponseV3, PositionAdlRankV3, PositionHistoryV3, UnfilledOrderV3 } from './types/response/v3/trade.js'; import { APIResponse } from './types/shared.js'; import BaseRestClient from './util/BaseRestClient.js'; /** * REST API client for all V3 endpoints */ export declare class RestClientV3 extends BaseRestClient { getClientType(): "v3"; /** * * Custom SDK functions * */ /** * This method is used to get the latency and time sync between the client and the server. * This is not official API endpoint and is only used for internal testing purposes. * Use this method to check the latency and time sync between the client and the server. * Final values might vary slightly, but it should be within few ms difference. * If you have any suggestions or improvements to this measurement, please create an issue or pull request on GitHub. */ fetchLatencySummary(): Promise; fetchServerTime(): Promise; /** * * Public endpoints * */ getServerTime(): Promise>; /** * * =====Market======= endpoints * */ /** * Get Instruments */ getInstruments(params: GetInstrumentsRequestV3): Promise>; /** * Get Market Maker Fee Group - Query fee rate tiers and grouping */ getMarketFeeGroup(params: GetMarketFeeGroupRequestV3): Promise>; /** * Get Market Maker Score Weight - Query score weights per symbol */ getMarketScoreWeights(params?: GetMarketScoreWeightsRequestV3): Promise>; /** * Get Tickers */ getTickers(params: GetTickersRequestV3): Promise>; /** * Get OrderBook */ getOrderBook(params: GetOrderBookRequestV3): Promise>; /** * Get Recent Public Fills */ getFills(params: GetPublicFillsRequestV3): Promise>; /** * Get Proof Of Reserves */ getProofOfReserves(): Promise>; /** * Get Open Interest */ getOpenInterest(params: GetOpenInterestRequestV3): Promise>; /** * Get Kline/Candlestick * Maximum number of returned entries: 1,000 */ getCandles(params: GetCandlesRequestV3): Promise>; /** * Get Kline/Candlestick History */ getHistoryCandles(params: GetHistoryCandlesRequestV3): Promise>; /** * Get Current Funding Rate */ getCurrentFundingRate(params: GetCurrentFundingRateRequestV3): Promise>; /** * Get Funding Rate History */ getHistoryFundingRate(params: GetHistoryFundingRateRequestV3): Promise>; /** * Get Risk Reserve */ getRiskReserve(params: GetRiskReserveRequestV3): Promise>; /** * Get Discount Rate */ getDiscountRate(): Promise>; /** * Get Margin Loan */ getMarginLoans(params: GetMarginLoansRequestV3): Promise>; /** * Get Position Tier */ getPositionTier(params: GetPositionTierRequestV3): Promise>; /** * Get Open Interest Limit */ getContractsOi(params: GetContractsOiRequestV3): Promise>; /** * Get Index Price Components */ getIndexComponents(params: GetIndexComponentsRequestV3): Promise>; /** * * =====Account======= endpoints * */ /** * Get Account Assets */ getBalances(): Promise>; /** * Get Fund Account Assets */ getFundingAssets(params?: GetFundingAssetsRequestV3): Promise>; /** * Get Account Info */ getAccountSettings(): Promise>; /** * Set Leverage */ setLeverage(params: SetLeverageRequestV3): Promise>; /** * Set Holding Mode */ setHoldMode(params: { holdMode: 'one_way_mode' | 'hedge_mode'; }): Promise>; /** * Get Financial Records */ getFinancialRecords(params: GetFinancialRecordsRequestV3): Promise>; /** * Get Repayable Coins */ getRepayableCoins(): Promise>; /** * Get Payment Coins */ getPaymentCoins(): Promise>; /** * Repay */ submitRepay(params: RepayRequestV3): Promise>; /** * Get Convert Records */ getConvertRecords(params: GetConvertRecordsRequestV3): Promise>; /** * Set up deposit account - Configure default recharge account for a certain symbol * This configuration item remains valid for a long time. That is, once a user sets a default * recharge account for a certain symbol, it will be retained permanently, and there is no need to reconfigure it. * Permission: UTA mgt. (read & write) */ setDepositAccount(params: SetDepositAccountRequestV3): Promise>; /** * Switch Deduct - Set BGB deduction */ switchDeduct(params: SwitchDeductRequestV3): Promise>; /** * Get Deduct Info - Get BGB deduction status */ getDeductInfo(): Promise>; /** * Get Trading Fee Rate */ getFeeRate(params: GetFeeRateRequestV3): Promise>; /** * Get Max Transferable * * - Rate limit: 3 req/sec/UID * - Permission: UTA mgt. (read) * - Get the maximum transferable amount for the unified account. */ getMaxTransferable(params: GetMaxTransferableRequestV3): Promise>; /** * Get Open Interest Limit * * - Rate limit: 5/sec/UID * - Get open interest limit for a symbol */ getOpenInterestLimit(params: GetOpenInterestLimitRequestV3): Promise>; /** * Switch Account - Switch to classic account mode * Only supports parent accounts. * This endpoint is only used for switching to classic account mode. * Please note that since the account switching process takes approximately 1 minute, * the successful response you receive only indicates that the request has been received, * and does not mean that the account has been successfully switched to the classic account. * Please use the query switching status interface to confirm whether the account switching is successful. */ downgradeAccountToClassic(): Promise>; /** * Get Switch Status - Get account switching status * Only supports parent accounts. */ getUnifiedAccountSwitchStatus(): Promise>; /** * Get Tax Records * * - Rate limit: 1/sec/UID * - Data query range: 366 days * - Please use the tax API Key to request Creation Portal * - Get Unified Account Tax Records */ getTaxRecords(params: GetTaxRecordsRequestV3): Promise>; /** * * =====SubAccount======= endpoints * */ /** * Create Sub-account */ createSubAccount(params: CreateSubAccountRequestV3): Promise>; /** * Freeze/Unfreeze Sub-account */ freezeSubAccount(params: FreezeSubAccountRequestV3): Promise>; /** * Get Sub-account Unified Account Assets */ getSubUnifiedAssets(params?: GetSubUnifiedAssetsRequestV3): Promise>; /** * Get Sub-account List */ getSubAccountList(params?: GetSubAccountListRequestV3): Promise>; /** * Create Sub-account API Key */ createSubAccountApiKey(params: CreateSubAccountApiKeyRequestV3): Promise>; /** * Modify Sub-account API Key */ updateSubAccountApiKey(params: UpdateSubAccountApiKeyRequestV3): Promise>; /** * Delete Sub-account API Key */ deleteSubAccountApiKey(params: DeleteSubAccountApiKeyRequestV3): Promise>; /** * Get Sub-account API Keys */ getSubAccountApiKeys(params: GetSubAccountApiKeysRequestV3): Promise>; /** * * =====Transfer======= endpoints * */ /** * Get Transferable Coins */ getTransferableCoins(params: GetTransferableCoinsRequestV3): Promise>; /** * Transfer */ submitTransfer(params: TransferRequestV3): Promise>; /** * Main-Sub Account Transfer */ subAccountTransfer(params: SubAccountTransferRequestV3): Promise>; /** * Get Main-Sub Transfer Records */ getSubTransferRecords(params?: GetSubTransferRecordsRequestV3): Promise>; /** * * =====Deposit======= endpoints * */ /** * Get Deposit Address */ getDepositAddress(params: GetDepositAddressRequestV3): Promise>; /** * Get Sub Deposit Address */ getSubDepositAddress(params: GetSubDepositAddressRequestV3): Promise>; /** * Get Deposit Records */ getDepositRecords(params: GetDepositRecordsRequestV3): Promise>; /** * Get Sub Deposit Records */ getSubDepositRecords(params: GetSubDepositRecordsRequestV3): Promise>; /** * * =====Withdraw======= endpoints * */ /** * Withdraw - Includes on-chain withdrawals and internal transfers */ submitWithdraw(params: WithdrawRequestV3): Promise>; /** * Get Withdraw Records */ getWithdrawRecords(params: GetWithdrawRecordsRequestV3): Promise>; /** * * =====Trade======= endpoints * */ /** * Place Order */ submitNewOrder(params: PlaceOrderRequestV3): Promise>; /** * Modify Order */ modifyOrder(params: ModifyOrderRequestV3): Promise>; /** * Cancel Order */ cancelOrder(params: CancelOrderRequestV3): Promise>; /** * Batch Order */ placeBatchOrders(params: PlaceBatchOrdersRequestV3[]): Promise>; /** * Batch Modify Orders */ batchModifyOrders(params: BatchModifyOrderRequestV3[]): Promise>; /** * Batch Cancel */ cancelBatchOrders(params: CancelBatchOrdersRequestV3[]): Promise>; /** * Cancel All Orders */ cancelAllOrders(params: CancelAllOrdersRequestV3): Promise>; /** * Close All Positions */ closeAllPositions(params: CloseAllPositionsRequestV3): Promise>; /** * Get Order Details */ getOrderInfo(params: GetOrderInfoRequestV3): Promise>; /** * Get Open Orders */ getUnfilledOrders(params?: GetUnfilledOrdersRequestV3): Promise>; /** * Get Order History */ getHistoryOrders(params: GetHistoryOrdersRequestV3): Promise>; /** * Get Fill History */ getTradeFills(params?: GetFillsRequestV3): Promise>; /** * Get Position Info */ getCurrentPosition(params: GetCurrentPositionRequestV3): Promise>; /** * Get Positions History */ getPositionHistory(params: GetPositionHistoryRequestV3): Promise>; /** * Get Max Open Available */ getMaxOpenAvailable(params: GetMaxOpenAvailableRequestV3): Promise>; /** * Get Position ADL Rank - Get position auto-deleveraging ranking */ getPositionAdlRank(): Promise>; /** * CountDown Cancel All */ countdownCancelAll(params: CountdownCancelAllRequestV3): Promise>; /** * * =====Inst Loan======= endpoints * */ /** * Get Transferred Quantity */ getLoanTransfered(params: GetTransferedRequestV3): Promise>; /** * Get Trade Symbols */ getLoanSymbols(params: GetSymbolsRequestV3): Promise>; /** * Get Risk Unit */ getLoanRiskUnit(): Promise>; /** * Get Repayment Orders */ getLoanRepaidHistory(params?: GetRepaidHistoryRequestV3): Promise>; /** * Get Product Info */ getLoanProductInfo(params: GetProductInfosRequestV3): Promise>; /** * Get Loan Orders */ getLoanOrder(params?: GetLoanOrderRequestV3): Promise>; /** * Get LTV */ getLoanLTVConvert(params?: GetLTVConvertRequestV3): Promise>; /** * Get Margin Coin Info */ getLoanMarginCoinInfo(params: GetEnsureCoinsRequestV3): Promise>; /** * Bind/Unbind UID to Risk Unit */ bindLoanUid(params: BindUidRequestV3): Promise>; /** * * =====Unified Account Staking & Lending (Crypto Loans)===== /api/v3/loan/* * */ /** * Get Loan Coins - Query supported collateral currencies and borrowable coins */ getLoanCoins(params?: GetLoanCoinsRequestV3): Promise>; /** * Get Loan Interest - Query estimated interest and borrowable amount */ getLoanInterest(params: GetLoanInterestRequestV3): Promise>; /** * Borrow - Borrow coins */ loanBorrow(params: LoanBorrowRequestV3): Promise>; /** * Get Borrow Ongoing - Query current borrowings */ getLoanBorrowOngoing(params?: GetLoanBorrowOngoingRequestV3): Promise>; /** * Get Borrow History - Query borrowing history */ getLoanBorrowHistory(params: GetLoanBorrowHistoryRequestV3): Promise>; /** * Repay - Repay coins */ loanRepay(params: LoanRepayRequestV3): Promise>; /** * Get Repay History - Query repayment history */ getLoanRepayHistory(params: GetLoanRepayHistoryRequestV3): Promise>; /** * Revise Pledge - Adjust collateral ratio */ loanRevisePledge(params: LoanRevisePledgeRequestV3): Promise>; /** * Get Pledge Rate History - Query collateral ratio history */ getLoanPledgeRateHistory(params: GetLoanPledgeRateHistoryRequestV3): Promise>; /** * Get Loan Debts - Query assets and liabilities */ getLoanDebts(): Promise>; /** * Get Loan Reduces - Query liquidation records */ getLoanReduces(params: GetLoanReducesRequestV3): Promise>; /** * * =====Strategy======= endpoints * */ /** * Place Strategy Order */ submitStrategyOrder(params: PlaceStrategyOrderRequestV3): Promise>; /** * Modify Strategy Order */ modifyStrategyOrder(params: ModifyStrategyOrderRequestV3): Promise>; /** * Cancel Strategy Order */ cancelStrategyOrder(params: CancelStrategyOrderRequestV3): Promise>; /** * Get Unfilled Strategy Orders */ getUnfilledStrategyOrders(params: GetUnfilledStrategyOrdersRequestV3): Promise>; /** * Get Strategy Order History */ getHistoryStrategyOrders(params: GetHistoryStrategyOrdersRequestV3): Promise>; /** * * =====Broker======= endpoints * */ /** * Create Broker Sub-Account * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ createBrokerSubAccount(params: CreateBrokerSubAccountRequestV3): Promise>; /** * Get Broker Sub-Account List * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ getBrokerSubAccountList(params?: GetBrokerSubAccountListRequestV3): Promise>; /** * Modify Broker Sub-Account * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ modifyBrokerSubAccount(params: ModifyBrokerSubAccountRequestV3): Promise>; /** * Broker Subaccount Withdrawal * * Broker sub-account withdrawal API has restrictions and currently supports only the following currencies: * BTC, ETH, USDT, USDC, TRX, XRP, LTC, SOL, BNB, FTM, DOGE, ADA, SHIB, UNI, SEI, SUI, POL, FIL, LINK, TON, ARB, OP, DOT, AVAX * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ brokerSubWithdrawal(params: BrokerSubWithdrawalRequestV3): Promise>; /** * Get Broker Subaccount Deposit Address * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ getBrokerSubDepositAddress(params: GetBrokerSubDepositAddressRequestV3): Promise>; /** * Get All Broker Subaccount Deposit Withdrawal * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ getBrokerAllSubDepositWithdrawal(params?: GetBrokerAllSubDepositWithdrawalRequestV3): Promise>; /** * Get Broker Commission * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ getBrokerCommission(params?: GetBrokerCommissionRequestV3): Promise>; /** * Create Broker Sub-Account API Key * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ createBrokerSubApiKey(params: CreateBrokerSubApiKeyRequestV3): Promise>; /** * Modify Broker Sub-Account API Key * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ modifyBrokerSubApiKey(params: ModifyBrokerSubApiKeyRequestV3): Promise>; /** * Delete Broker Subaccount Apikey * * This endpoint has no response parameters. * It returns the deletion result synchronously. * Determine whether the deletion succeeded or failed (and the failure reason) based on the returned code and msg. * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ deleteBrokerSubApiKey(params: DeleteBrokerSubApiKeyRequestV3): Promise>; /** * Get Broker Sub-Account API Key * * Rate limit: 20/sec/UID * Only the master account with a user type of ND Broker can call this API endpoint. */ getBrokerSubApiKey(params: GetBrokerSubApiKeyRequestV3): Promise>; }