binance 3.0.0-beta.8 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/main-client.d.ts +100 -2
- package/lib/main-client.js +126 -1
- package/lib/main-client.js.map +1 -1
- package/lib/types/futures.d.ts +11 -0
- package/lib/types/shared.d.ts +8 -1
- package/lib/types/spot.d.ts +346 -3
- package/lib/types/websockets/ws-api-requests.d.ts +37 -29
- package/lib/types/websockets/ws-api-responses.d.ts +35 -1
- package/lib/types/websockets/ws-api.d.ts +11 -9
- package/lib/types/websockets/ws-api.js +1 -0
- package/lib/types/websockets/ws-api.js.map +1 -1
- package/lib/types/websockets/ws-events-formatted.d.ts +14 -12
- package/lib/types/websockets/ws-events-raw.d.ts +10 -0
- package/lib/types/websockets/ws-general.d.ts +5 -0
- package/lib/usdm-client.d.ts +4 -1
- package/lib/usdm-client.js +3 -0
- package/lib/usdm-client.js.map +1 -1
- package/lib/util/BaseRestClient.d.ts +2 -1
- package/lib/util/BaseRestClient.js +6 -5
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/BaseWSClient.js +28 -5
- package/lib/util/BaseWSClient.js.map +1 -1
- package/lib/util/beautifier-maps.d.ts +34 -0
- package/lib/util/beautifier-maps.js +34 -0
- package/lib/util/beautifier-maps.js.map +1 -1
- package/lib/util/beautifier.d.ts +1 -0
- package/lib/util/beautifier.js +46 -7
- package/lib/util/beautifier.js.map +1 -1
- package/lib/util/node-support.js +3 -1
- package/lib/util/node-support.js.map +1 -1
- package/lib/util/requestUtils.d.ts +2 -2
- package/lib/util/requestUtils.js +69 -16
- package/lib/util/requestUtils.js.map +1 -1
- package/lib/util/typeGuards.d.ts +27 -4
- package/lib/util/typeGuards.js +103 -41
- package/lib/util/typeGuards.js.map +1 -1
- package/lib/util/webCryptoAPI.js +0 -2
- package/lib/util/webCryptoAPI.js.map +1 -1
- package/lib/util/websockets/WsStore.js.map +1 -1
- package/lib/util/websockets/user-data-stream-manager.js +2 -2
- package/lib/util/websockets/user-data-stream-manager.js.map +1 -1
- package/lib/util/websockets/websocket-util.d.ts +16 -2
- package/lib/util/websockets/websocket-util.js +92 -42
- package/lib/util/websockets/websocket-util.js.map +1 -1
- package/lib/websocket-api-client.d.ts +14 -8
- package/lib/websocket-api-client.js +39 -24
- package/lib/websocket-api-client.js.map +1 -1
- package/lib/websocket-client-legacy.js +3 -3
- package/lib/websocket-client-legacy.js.map +1 -1
- package/lib/websocket-client.d.ts +48 -14
- package/lib/websocket-client.js +312 -154
- package/lib/websocket-client.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Refer to the [examples](./examples) folder for implementation demos.
|
|
|
92
92
|
- Issues? Check the [issues tab](https://github.com/tiagosiebler/binance/issues).
|
|
93
93
|
- Discuss & collaborate with other node devs? Join our [Node.js Algo Traders](https://t.me/nodetraders) engineering community on telegram.
|
|
94
94
|
- Questions about Binance APIs & WebSockets? Ask in the official [Binance API](https://t.me/binance_api_english) group on telegram.
|
|
95
|
-
- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/
|
|
95
|
+
- Follow our announcement channel for real-time updates on [X/Twitter](https://x.com/sieblyio)
|
|
96
96
|
|
|
97
97
|
<!-- template_related_projects -->
|
|
98
98
|
|
package/lib/main-client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { BasicAssetPaginatedParams, BasicAssetParam, BasicSymbolParam, BinanceBaseUrlKey, CancelOCOParams, CancelOrderParams, CoinStartEndLimit, ExchangeSymbol, GetAllOrdersParams, GetOrderParams, HistoricalTradesParams, Kline, KlinesParams, NewOCOParams, NewOrderListParams, OrderBookParams, OrderResponseType, OrderType, RecentTradesParams, RowsWithTotal, SymbolFromPaginatedRequestFromId, SymbolPrice } from './types/shared';
|
|
3
|
-
import { AcceptQuoteRequestParams, AccountInfo, AccountInformation, AddBSwapLiquidityParams, AddIpRestriction, AdjustCryptoLoanLTVParams, AdjustCryptoLoanLTVResponse, AdjustFlexibleCryptoLoanLTVParams, AdjustFlexibleCryptoLoanLTVResponse, AggregateTrade, AlgoOrder, AllCoinsInformationResponse, Allocation, AllocationsParams, ApiKeyBrokerSubAccount, APIPermissions, APITradingStatus, ApplicationStatus, AssetDetail, BasicFromPaginatedParams, BasicFuturesSubAccountParams, BasicMarginAssetParams, BasicSubAccount, BasicTimeRangeParam, BethRewardsHistory, BlvtRedemptionRecord, BlvtSubscriptionRecord, BlvtUserLimitInfo, BNBBurnResponse, BnbTransferParams, BnsolRateHistoryRecord, BnsolRewardHistoryRecord, BorrowCryptoLoanParams, BorrowCryptoLoanResponse, BorrowFlexibleLoanParams, BorrowFlexibleLoanResponse, BorrowInterestRate, BrokerCommissionRebate, BrokerSubAccount, BrokerSubAccountCoinFuturesCommission, BrokerSubAccountFuturesCommission, BrokerSubAccountHistory, BrokerUniversalTransfer, BSwapLiquidity, BSwapOperations, BSwapOperationsParams, BUSDConversionRecord, CancelAlgoOrderResponse, CancelHashrateResaleConfigParams, CancelOrderListResult, CancelSpotAlgoOrderResponse, CancelSpotOrderResult, ChangeAutoCompoundStatusParams, ChangeAutoCompoundStatusResponse, ChangePermissionApiKeyBrokerSubAccountParams, ChangePermissionApiKeyBrokerSubAccountResponse, ChangePlanStatusParams, ChangePlanStatusResponse, ChangeSubAccountCoinFuturesCommissionParams, ChangeSubAccountCommissionParams, ChangeSubAccountCommissionResponse, ChangeSubAccountFuturesCommissionParams, ChangeSubAccountFuturesCommissionResponse, CheckCollateralRepayRateParams, CheckCollateralRepayRateResponse, CheckDualInvestmentAccountsResponse, CheckVipCollateralAccountParams, CloudMining, CloudMiningHistoryParams, CoinMarginedFuturesResponse, Collateral, CollateralAssetData, CollateralRecord, CommissionRates, ConvertDustParams, ConvertibleCoinsParams, ConvertibleCoinsResponse, ConvertLimitOpenOrder, ConvertQuoteRequestParams, ConvertTransfer, ConvertTransferResponse, CreateApiKeyBrokerSubAccountParams, CreateApiKeyBrokerSubAccountResponse, CreateBrokerSubAccountParams, CreateDualTokenGiftCardParams, CreateGiftCardParams, CreateInvestmentPlanParams, CreateInvestmentPlanResponse, CreateSpecialLowLatencyKeyParams, CreateSubAccountParams, CrossMarginFeeData, CrossMarginTransferHistory, CurrentAvgPrice, CustomizeMarginCall, CustomizeMarginCallParams, DailyAccountSnapshot, DailyAccountSnapshotParams, DelegationHistory, DelegationHistoryParams, DeleteApiKeyBrokerSubAccountParams, DelistScheduleResponse, DepositAddress, DepositAddressListParams, DepositAddressParams, DepositAddressResponse, DepositHistory, DepositHistoryParams, DualInvestmentPosition, DualInvestmentProduct, DustConversion, DustInfo, DustLog, EditInvestmentPlanParams, EditInvestmentPlanResponse, EnableConvertSubAccountParams, EnableFuturesBrokerSubAccountParams, EnableFuturesBrokerSubAccountResponse, EnableMarginApiKeyBrokerSubAccountParams, EnableMarginBrokerSubAccountParams, EnableMarginBrokerSubAccountResponse, EnableOptionsForSubAccountResponse, EnableOrDisableIPRestrictionForSubAccountParams, EnableUniversalTransferApiKeyBrokerSubAccountParams, EnableUniversalTransferApiKeyBrokerSubAccountResponse, ETHRateHistory, EthRedemptionHistory, EthStakingHistory, ExchangeInfo, ExchangeInfoParams, FixedAndActivityProjectParams, FixedAndActivityProjectPositionParams, FlexibleCryptoLoanBorrowHistory, FlexibleLoanAssetData, FlexibleLoanCollateralAssetData, FlexibleLoanLiquidationHistoryRecord, FlexibleLoanLTVAdjustmentHistory, FlexibleLoanOngoingOrder, FlexibleRedemptionRecord, FlexibleRewardsHistory, FlexibleSubscriptionPreview, ForceLiquidationRecord, FundingAsset, FutureAccountTransfer, FuturesPositionRisk, GetAlgoHistoricalOrdersParams, GetAlgoSubOrdersParams, GetAlgoSubOrdersResponse, GetAllConvertPairsParams, GetApiKeyBrokerSubAccountParams, GetApplicationStatusParams, GetAssetParams, GetBethRewardsHistoryParams, GetBlvtRedemptionRecordParams, GetBlvtSubscriptionRecordParams, GetBnsolRateHistoryReq, GetBnsolRewardsHistoryReq, GetBrokerInfoResponse, GetBrokerSubAccountDepositHistoryParams, GetBrokerSubAccountHistoryParams, GetBrokerSubAccountParams, GetC2CTradeHistoryParams, GetC2CTradeHistoryResponse, GetCollateralAssetDataParams, GetCollateralRecordParams, GetConvertBUSDHistoryParams, GetConvertTradeHistoryParams, GetCrossMarginTransferHistoryParams, GetCryptoLoansIncomeHistoryParams, GetCryptoLoansIncomeHistoryResponse, GetDualInvestmentPositionsParams, GetDualInvestmentProductListParams, GetEarningsListParams, GetEarningsListResponse, GetETHRateHistoryParams, GetEthRedemptionHistoryParams, GetEthStakingAccountResponse, GetEthStakingAccountV2Response, GetEthStakingHistoryParams, GetEthStakingQuotaResponse, GetExtraBonusListParams, GetExtraBonusListResponse, GetFiatOrderHistoryParams, GetFiatOrderHistoryResponse, GetFiatPaymentsHistoryResponse, GetFlexibleCryptoLoanBorrowHistoryParams, GetFlexibleLoanLiquidationHistoryParams, GetFlexibleLoanLTVAdjustmentHistoryParams, GetFlexibleLoanOngoingOrdersParams, GetFlexibleRedemptionRecordParams, GetFlexibleRewardsHistoryParams, GetFlexibleSubscriptionPreviewParams, GetFlexibleSubscriptionRecordParams, GetFlexibleSubscriptionRecordResponse, GetForceLiquidationRecordParams, GetFutureAccountTransferHistoryParams, GetFuturesLeadTraderStatusResponse, GetFuturesLeadTradingSymbolWhitelistResponse, GetFutureTickLevelOrderbookDataLinkParams, GetHashrateResaleDetailParams, GetHashrateResaleDetailResponse, GetHashrateResaleListParams, GetHashrateResaleListResponse, GetIndexDetailsResponse, GetIndexLinkedPlanPositionDetailsResponse, GetIndexLinkedPlanRebalanceHistoryParams, GetIndexLinkedPlanRedemptionHistoryParams, GetLoanableAssetsDataParams, GetLoanBorrowHistoryParams, GetLoanCoinPaginatedHistoryParams, GetLoanLTVAdjustmentHistoryParams, GetLoanOngoingOrdersParams, GetLoanRepaymentHistoryParams, GetLockedRedemptionRecordParams, GetLockedRewardsHistory, GetLockedRewardsHistoryParams, GetLockedSubscriptionPreviewParams, GetLockedSubscriptionRecordParams, GetMarginAccountBorrowRepayRecordsParams, GetMarginCapitalFlowParams, GetMarginInterestHistoryParams, GetMarginOrderCountUsageParams, GetMinerDetailsParams, GetMinerDetailsResponse, GetMinerListParams, GetMinerListResponse, GetMiningAccountEarningParams, GetMiningAccountEarningResponse, getMiningAccountsListParams, getMiningAccountsListResponse, GetMiningAlgoListResponse, GetMiningCoinListResponse, GetNextHourlyInterestRateParams, GetNftAssetParams, GetNftDepositHistoryParams, GetNftTransactionHistoryParams, GetNftWithdrawHistoryParams, GetOCOParams, GetOneTimeTransactionStatusParams, GetOneTimeTransactionStatusResponse, GetOrderStatusParams, GetPayTradeHistoryParams, GetPlanDetailsParams, GetPortfolioMarginAssetIndexPriceResponse, GetPortfolioMarginAssetLeverageResponse, GetPortfolioMarginProAccountInfoResponse, GetPortfolioMarginProBankruptcyLoanAmountResponse, GetPortfolioMarginProCollateralRateResponse, GetPortfolioMarginProInterestHistoryParams, GetPortfolioMarginProInterestHistoryResponse, GetRateHistory, GetRateHistoryParams, GetSmallLiabilityExchangeHistoryParams, GetSolStakingHistoryReq, GetSourceAssetListParams, GetSourceAssetListResponse, GetSpotAlgoHistoricalOrdersParams, GetSpotAlgoSubOrdersParams, GetSpotAlgoSubOrdersResponse, GetSpotRebateHistoryRecordsParams, GetSpotRebateHistoryRecordsResponse, GetStatisticListParams, GetStatisticListResponse, GetSubAccountDepositHistoryParams, GetSubscriptionTransactionHistoryParams, GetTargetAssetListParams, GetTargetAssetListResponse, GetTargetAssetROIParams, GetTravelRuleDepositHistoryParams, GetTravelRuleWithdrawHistoryParams, GetTravelRuleWithdrawHistoryV2Params, GetUniversalTransferBrokerParams, GetVipLoanOngoingOrdersParams, GetVipLoanRepaymentHistoryParams, GetWbethRewardsHistoryResponse, GetWrapHistoryParams, HistoricalAlgoOrder, HistoricalDataLink, HistoricalSpotAlgoOrder, IndexLinkedPlanRedemptionRecord, IsolatedMarginAccountInfo, IsolatedMarginAccountTransferParams, IsolatedMarginFeeData, IsolatedMarginSymbol, IsolatedMarginTierData, LeftDailyPurchaseQuotaFlexibleProductResponse, LiabilityCoinLeverageBracket, LoanableAssetData, LoanBorrowHistory, LoanLTVAdjustmentHistory, LoanOngoingOrder, LoanRepaymentHistory, LockedRedemptionRecord, LockedSubscriptionPreview, LockedSubscriptionRecord, ManagedSubAccountDepositAddress, ManagedSubAccountDepositAddressParams, ManagedSubAccountFuturesAssetsResponse, ManagedSubAccountListParams, ManagedSubAccountMarginAssetsResponse, ManagedSubAccountSnapshot, ManagedSubAccountSnapshotParams, ManagedSubAccountTransferLogParams, ManagedSubAccountTransferTTLogParams, ManagerSubTransferHistoryVos, ManagerSubUserInfoVo, ManualLiquidationParams, ManualLiquidationResponse, MarginAccountLoanParams, MarginAccountRecord, MarginAvailableInventoryResponse, MarginCapitalFlow, MarginDelistSchedule, MarginInterestHistory, MarginInterestRateHistory, MarginOrderCountUsageResponse, MarginOTOCOOrder, MarginOTOOrder, MarginTransactionResponse, NewFutureAccountTransferParams, NewOrderListOTOCOParams, NewOrderListOTOCOResponse, NewOrderListOTOParams, NewOrderListOTOResponse, NewSpotOrderParams, NewSpotSOROrderParams, NextHourlyInterestRate, NftAsset, NftDeposit, NftTransaction, NftWithdraw, OrderBookResponse, OrderList, OrderListResponse, OrderRateLimitUsage, OrderResponseTypeFor, PMProMintBFUSDParams, PMProMintBFUSDResponse, PMProRedeemBFUSDResponse, PortfolioMarginProAccountBalance, PortfolioMarginProSpanAccountInfo, PreventedMatch, PreventedMatchesParams, PurchaseFlexibleProductResponse, PurchaseRecordParams, QueryBrokerFuturesCommissionRebateParams, QueryBrokerSpotCommissionRebateParams, QueryCrossMarginAccountDetailsParams, QueryCrossMarginFeeDataParams, QueryCrossMarginPairResponse, QueryIsolatedMarginTierDataParams, QueryMarginAccountAllOCOParams, QueryMarginAccountTradeListParams, QueryMarginAssetResponse, QueryMarginInterestRateHistoryParams, QueryMarginPriceIndexResponse, QueryMarginRecordParams, QueryMaxBorrowResponse, QueryMaxTransferOutAmountResponse, QuerySubAccountCoinFuturesCommissionParams, QuerySubAccountFuturesAssetInfoParams, QuerySubAccountFuturesCommissionParams, QuerySubAccountSpotMarginAssetInfoParams, RawAccountTrade, RawTrade, RedeemBlvtParams, RedeemBlvtResponse, RedeemEthParams, RedeemEthResponse, RedeemGiftCardParams, RedeemSolResponse, RemoveBSwapLiquidityParams, RepayCryptoFlexibleLoanParams, RepayCryptoFlexibleLoanResponse, RepayCryptoLoanFlexibleWithCollateralParams, RepayCryptoLoanFlexibleWithCollateralResponse, RepayCryptoLoanParams, RepayCryptoLoanResponse, ReplaceSpotOrderParams, ReplaceSpotOrderResultSuccess, RollingWindowTickerParams, SetAutoSubscribeParams, SimpleEarnAccountResponse, SimpleEarnFlexibleProduct, SimpleEarnFlexibleProductPositionParams, SimpleEarnLockedProduct, SimpleEarnLockedProductPosition, SimpleEarnLockedProductPositionParams, SimpleEarnProductListParams, SimpleEarnRedeemFlexibleProductParams, SimpleEarnRedeemResponse, SimpleEarnSubscribeFlexibleProductResponse, SimpleEarnSubscribeLockedProductResponse, SimpleEarnSubscribeProductParams, SmallLiabilityExchangeCoin, SmallLiabilityExchangeHistory, SolBoostRewardsHistoryRecord, SolBoostRewardsHistoryReq, SolRedemptionHistoryRecord, SolStakingAccount, SolStakingHistoryRecord, SolStakingQuota, SOROrderResponseFull, SORTestOrderResponse, SpecialLowLatencyKeyInfo, SpecialLowLatencyKeyResponse, SpotAlgoOrder, SpotOrder, StakingBasicParams, StakingHistory, StakingHistoryParams, StakingPersonalLeftQuota, StakingProduct, StakingProductPosition, StakingProductType, SubAccountAddOrDeleteIPList, SubAccountAssetDetails, SubAccountAssets, SubAccountAssetsParams, SubaccountBalances, SubAccountBrokerMarginAsset, SubaccountBrokerSpotAsset, SubAccountCOINMDetail, SubAccountCOINMPositionRisk, SubAccountCOINMSummary, SubAccountDeposit, SubAccountDepositAddress, SubAccountDepositAddressParams, SubAccountDepositHistoryList, SubAccountDepositHistoryParams, SubAccountEnableFutures, SubAccountEnableLeverageToken, SubAccountEnableMargin, SubAccountEnableOrDisableIPRestriction, SubAccountFuturesAccountDetail, SubAccountFuturesAccountSummary, SubAccountFuturesAssetTransfer, SubAccountFuturesAssetTransferHistory, SubAccountFuturesAssetTransferHistoryParams, SubAccountFuturesAssetTransferParams, SubAccountListParams, SubAccountListResponse, SubAccountMarginAccountDetail, SubAccountMovePosition, SubAccountMovePositionHistory, SubAccountMovePositionHistoryParams, SubAccountMovePositionParams, SubAccountsMarginAccountSummary, SubAccountSpotAssetsSummary, SubAccountSpotAssetsSummaryParams, SubAccountSpotAssetTransferHistory, SubAccountSpotAssetTransferHistoryParams, SubAccountStatus, SubAccountSummaryOnFuturesAccountV2Params, SubAccountTransactionStatistics, SubAccountTransfer, SubAccountTransferHistory, SubAccountTransferHistoryParams, SubAccountTransferParams, SubAccountTransferToMasterParams, SubAccountTransferToSameMasterParams, SubAccountUniversalTransfer, SubAccountUniversalTransferHistoryParams, SubAccountUniversalTransferHistoryResponse, SubAccountUniversalTransferParams, SubAccountUSDMDetail, SubAccountUSDMPositionRisk, SubAccountUSDMSummary, SubmitConvertLimitOrderParams, SubmitDepositCreditParams, SubmitDepositCreditResponse, SubmitHashrateResaleParams, SubmitIndexLinkedPlanRedemptionParams, SubmitMarginOTOCOOrderParams, SubmitMarginOTOOrderParams, SubmitOneTimeTransactionParams, SubmitOneTimeTransactionResponse, SubmitSpotTwapNewOrderParams, SubmitSpotTwapNewOrderResponse, SubmitTravelRuleDepositQuestionnaireParams, SubmitTravelRuleDepositQuestionnaireResponse, SubmitTwapNewOrderParams, SubmitTwapNewOrderResponse, SubmitVpNewOrderParams, SubmitVpNewOrderResponse, SubscribeBlvtParams, SubscribeBlvtResponse, SubscribeDualInvestmentProductParams, SubscribeDualInvestmentProductResponse, SubscribeEthStakingV2Response, SubscribeSolStakingResponse, SymbolOrderBookTicker, SymbolTradeFee, SystemStatusResponse, TargetAssetROI, Ticker24hrResponse, ToggleBNBBurnParams, TradingDayTickerArray, TradingDayTickerFull, TradingDayTickerMini, TradingDayTickerParams, TradingDayTickerSingle, TransferBrokerSubAccount, TransferBrokerSubAccountParams, TravelRuleDepositHistoryRecord, TravelRuleWithdrawHistoryRecord, UniversalTransferBrokerParams, UniversalTransferHistoryParams, UniversalTransferParams, UpdateIpRestrictionForSubApiKey, UsdtMarginedFuturesResponse, UserAsset, VASPInfo, VipCollateralAccount, VipLoanAccruedInterestParams, VipLoanAccruedInterestRecord, VipLoanBorrowParams, VipLoanBorrowResponse, VipLoanInterestRateHistoryParams, VipLoanInterestRateRecord, VipLoanRenewParams, VipLoanRenewResponse, VipLoanRepaymentHistory, VipLoanRepayParams, VipLoanRepayResponse, VipOngoingOrder, VirtualSubAccount, WalletBalance, WithdrawAddress, WithdrawAssetsFromManagedSubAccountParams, WithdrawHistory, WithdrawHistoryParams, WithdrawParams, WithdrawTravelRuleParams, WrapBethResponse, WrapHistory } from './types/spot';
|
|
2
|
+
import { AmendKeepPriorityParams, BasicAssetPaginatedParams, BasicAssetParam, BasicSymbolParam, BinanceBaseUrlKey, CancelOCOParams, CancelOrderParams, CoinStartEndLimit, ExchangeSymbol, GetAllOrdersParams, GetOrderParams, HistoricalTradesParams, Kline, KlinesParams, NewOCOParams, NewOrderListParams, OrderBookParams, OrderResponseType, OrderType, RecentTradesParams, RowsWithTotal, SymbolFromPaginatedRequestFromId, SymbolPrice } from './types/shared';
|
|
3
|
+
import { AcceptQuoteRequestParams, AccountInfo, AccountInformation, ActiveInstitutionalLoanRiskUnit, AddBSwapLiquidityParams, AddInstitutionalLoanCollateralAccountParams, AddIpRestriction, AdjustCryptoLoanLTVParams, AdjustCryptoLoanLTVResponse, AdjustFlexibleCryptoLoanLTVParams, AdjustFlexibleCryptoLoanLTVResponse, AggregateTrade, AlgoOrder, AllCoinsInformationResponse, Allocation, AllocationsParams, ApiKeyBrokerSubAccount, APIPermissions, APITradingStatus, ApplicationStatus, AssetDetail, BasicFromPaginatedParams, BasicFuturesSubAccountParams, BasicMarginAssetParams, BasicSubAccount, BasicTimeRangeParam, BethRewardsHistory, BlvtRedemptionRecord, BlvtSubscriptionRecord, BlvtUserLimitInfo, BNBBurnResponse, BnbTransferParams, BnsolRateHistoryRecord, BnsolRewardHistoryRecord, BorrowCryptoLoanParams, BorrowCryptoLoanResponse, BorrowFlexibleLoanParams, BorrowFlexibleLoanResponse, BorrowInterestRate, BrokerCommissionRebate, BrokerSubAccount, BrokerSubAccountCoinFuturesCommission, BrokerSubAccountFuturesCommission, BrokerSubAccountHistory, BrokerUniversalTransfer, BSwapLiquidity, BSwapOperations, BSwapOperationsParams, BUSDConversionRecord, CancelAlgoOrderResponse, CancelHashrateResaleConfigParams, CancelOrderListResult, CancelSpotAlgoOrderResponse, CancelSpotOrderResult, ChangeAutoCompoundStatusParams, ChangeAutoCompoundStatusResponse, ChangePermissionApiKeyBrokerSubAccountParams, ChangePermissionApiKeyBrokerSubAccountResponse, ChangePlanStatusParams, ChangePlanStatusResponse, ChangeSubAccountCoinFuturesCommissionParams, ChangeSubAccountCommissionParams, ChangeSubAccountCommissionResponse, ChangeSubAccountFuturesCommissionParams, ChangeSubAccountFuturesCommissionResponse, CheckCollateralRepayRateParams, CheckCollateralRepayRateResponse, CheckDualInvestmentAccountsResponse, CheckVipCollateralAccountParams, CloseInstitutionalLoanRiskUnitResponse, CloudMining, CloudMiningHistoryParams, CoinMarginedFuturesResponse, Collateral, CollateralAssetData, CollateralRecord, CommissionRates, ConvertDustParams, ConvertibleCoinsParams, ConvertibleCoinsResponse, ConvertLimitOpenOrder, ConvertQuoteRequestParams, ConvertTransfer, ConvertTransferResponse, CreateApiKeyBrokerSubAccountParams, CreateApiKeyBrokerSubAccountResponse, CreateBrokerSubAccountParams, CreateDualTokenGiftCardParams, CreateGiftCardParams, CreateInvestmentPlanParams, CreateInvestmentPlanResponse, CreateSpecialLowLatencyKeyParams, CreateSubAccountParams, CrossMarginFeeData, CrossMarginTransferHistory, CurrentAvgPrice, CustomizeMarginCall, CustomizeMarginCallParams, DailyAccountSnapshot, DailyAccountSnapshotParams, DelegationHistory, DelegationHistoryParams, DeleteApiKeyBrokerSubAccountParams, DelistScheduleResponse, DepositAddress, DepositAddressListParams, DepositAddressParams, DepositAddressResponse, DepositHistory, DepositHistoryParams, DualInvestmentPosition, DualInvestmentProduct, DustConversion, DustInfo, DustLog, EditInvestmentPlanParams, EditInvestmentPlanResponse, EnableConvertSubAccountParams, EnableFuturesBrokerSubAccountParams, EnableFuturesBrokerSubAccountResponse, EnableMarginApiKeyBrokerSubAccountParams, EnableMarginBrokerSubAccountParams, EnableMarginBrokerSubAccountResponse, EnableOptionsForSubAccountResponse, EnableOrDisableIPRestrictionForSubAccountParams, EnableUniversalTransferApiKeyBrokerSubAccountParams, EnableUniversalTransferApiKeyBrokerSubAccountResponse, ETHRateHistory, EthRedemptionHistory, EthStakingHistory, ExchangeInfo, ExchangeInfoParams, FixedAndActivityProjectParams, FixedAndActivityProjectPositionParams, FlexibleCryptoLoanBorrowHistory, FlexibleLoanAssetData, FlexibleLoanCollateralAssetData, FlexibleLoanLiquidationHistoryRecord, FlexibleLoanLTVAdjustmentHistory, FlexibleLoanOngoingOrder, FlexibleRedemptionRecord, FlexibleRewardsHistory, FlexibleSubscriptionPreview, ForceLiquidationRecord, FundingAsset, FutureAccountTransfer, FuturesPositionRisk, GetAlgoHistoricalOrdersParams, GetAlgoSubOrdersParams, GetAlgoSubOrdersResponse, GetAllConvertPairsParams, GetApiKeyBrokerSubAccountParams, GetApplicationStatusParams, GetAssetParams, GetBethRewardsHistoryParams, GetBlvtRedemptionRecordParams, GetBlvtSubscriptionRecordParams, GetBnsolRateHistoryReq, GetBnsolRewardsHistoryReq, GetBrokerInfoResponse, GetBrokerSubAccountDepositHistoryParams, GetBrokerSubAccountHistoryParams, GetBrokerSubAccountParams, GetC2CTradeHistoryParams, GetC2CTradeHistoryResponse, GetCollateralAssetDataParams, GetCollateralRecordParams, GetConvertBUSDHistoryParams, GetConvertTradeHistoryParams, GetCrossMarginTransferHistoryParams, GetCryptoLoansIncomeHistoryParams, GetCryptoLoansIncomeHistoryResponse, GetDualInvestmentPositionsParams, GetDualInvestmentProductListParams, GetEarningsListParams, GetEarningsListResponse, GetETHRateHistoryParams, GetEthRedemptionHistoryParams, GetEthStakingAccountResponse, GetEthStakingAccountV2Response, GetEthStakingHistoryParams, GetEthStakingQuotaResponse, GetExtraBonusListParams, GetExtraBonusListResponse, GetFiatOrderHistoryParams, GetFiatOrderHistoryResponse, GetFiatPaymentsHistoryResponse, GetFlexibleCryptoLoanBorrowHistoryParams, GetFlexibleLoanLiquidationHistoryParams, GetFlexibleLoanLTVAdjustmentHistoryParams, GetFlexibleLoanOngoingOrdersParams, GetFlexibleRedemptionRecordParams, GetFlexibleRewardsHistoryParams, GetFlexibleSubscriptionPreviewParams, GetFlexibleSubscriptionRecordParams, GetFlexibleSubscriptionRecordResponse, GetForceLiquidationRecordParams, GetFutureAccountTransferHistoryParams, GetFuturesLeadTraderStatusResponse, GetFuturesLeadTradingSymbolWhitelistResponse, GetFutureTickLevelOrderbookDataLinkParams, GetHashrateResaleDetailParams, GetHashrateResaleDetailResponse, GetHashrateResaleListParams, GetHashrateResaleListResponse, GetIndexDetailsResponse, GetIndexLinkedPlanPositionDetailsResponse, GetIndexLinkedPlanRebalanceHistoryParams, GetIndexLinkedPlanRedemptionHistoryParams, GetInstitutionalLoanInterestHistoryParams, GetInstitutionalLoanRiskUnitDetailsParams, GetLoanableAssetsDataParams, GetLoanBorrowHistoryParams, GetLoanCoinPaginatedHistoryParams, GetLoanLTVAdjustmentHistoryParams, GetLoanOngoingOrdersParams, GetLoanRepaymentHistoryParams, GetLockedRedemptionRecordParams, GetLockedRewardsHistory, GetLockedRewardsHistoryParams, GetLockedSubscriptionPreviewParams, GetLockedSubscriptionRecordParams, GetMarginAccountBorrowRepayRecordsParams, GetMarginCapitalFlowParams, GetMarginInterestHistoryParams, GetMarginOrderCountUsageParams, GetMinerDetailsParams, GetMinerDetailsResponse, GetMinerListParams, GetMinerListResponse, GetMiningAccountEarningParams, GetMiningAccountEarningResponse, getMiningAccountsListParams, getMiningAccountsListResponse, GetMiningAlgoListResponse, GetMiningCoinListResponse, GetNextHourlyInterestRateParams, GetNftAssetParams, GetNftDepositHistoryParams, GetNftTransactionHistoryParams, GetNftWithdrawHistoryParams, GetOCOParams, GetOneTimeTransactionStatusParams, GetOneTimeTransactionStatusResponse, GetOrderStatusParams, GetPayTradeHistoryParams, GetPlanDetailsParams, GetPortfolioMarginAssetIndexPriceResponse, GetPortfolioMarginAssetLeverageResponse, GetPortfolioMarginProAccountInfoResponse, GetPortfolioMarginProBankruptcyLoanAmountResponse, GetPortfolioMarginProCollateralRateResponse, GetPortfolioMarginProInterestHistoryParams, GetPortfolioMarginProInterestHistoryResponse, GetRateHistory, GetRateHistoryParams, GetSmallLiabilityExchangeHistoryParams, GetSolStakingHistoryReq, GetSourceAssetListParams, GetSourceAssetListResponse, GetSpotAlgoHistoricalOrdersParams, GetSpotAlgoSubOrdersParams, GetSpotAlgoSubOrdersResponse, GetSpotRebateHistoryRecordsParams, GetSpotRebateHistoryRecordsResponse, GetStatisticListParams, GetStatisticListResponse, GetSubAccountDepositHistoryParams, GetSubscriptionTransactionHistoryParams, GetTargetAssetListParams, GetTargetAssetListResponse, GetTargetAssetROIParams, GetTravelRuleDepositHistoryParams, GetTravelRuleWithdrawHistoryParams, GetTravelRuleWithdrawHistoryV2Params, GetUniversalTransferBrokerParams, GetVipLoanOngoingOrdersParams, GetVipLoanRepaymentHistoryParams, GetWbethRewardsHistoryResponse, GetWrapHistoryParams, HistoricalAlgoOrder, HistoricalDataLink, HistoricalSpotAlgoOrder, IndexLinkedPlanRedemptionRecord, InstitutionalLoanBorrowParams, InstitutionalLoanBorrowResponse, InstitutionalLoanInterestHistoryResponse, InstitutionalLoanRepayParams, InstitutionalLoanRepayResponse, InstitutionalLoanRiskUnitDetails, IsolatedMarginAccountInfo, IsolatedMarginAccountTransferParams, IsolatedMarginFeeData, IsolatedMarginSymbol, IsolatedMarginTierData, LeftDailyPurchaseQuotaFlexibleProductResponse, LiabilityCoinLeverageBracket, LoanableAssetData, LoanBorrowHistory, LoanLTVAdjustmentHistory, LoanOngoingOrder, LoanRepaymentHistory, LockedRedemptionRecord, LockedSubscriptionPreview, LockedSubscriptionRecord, ManagedSubAccountDepositAddress, ManagedSubAccountDepositAddressParams, ManagedSubAccountFuturesAssetsResponse, ManagedSubAccountListParams, ManagedSubAccountMarginAssetsResponse, ManagedSubAccountSnapshot, ManagedSubAccountSnapshotParams, ManagedSubAccountTransferLogParams, ManagedSubAccountTransferTTLogParams, ManagerSubTransferHistoryVos, ManagerSubUserInfoVo, ManualLiquidationParams, ManualLiquidationResponse, MarginAccountLoanParams, MarginAccountRecord, MarginAvailableInventoryResponse, MarginCapitalFlow, MarginDelistSchedule, MarginInterestHistory, MarginInterestRateHistory, MarginOrderCountUsageResponse, MarginOTOCOOrder, MarginOTOOrder, MarginTransactionResponse, NewFutureAccountTransferParams, NewOrderListOTOCOParams, NewOrderListOTOCOResponse, NewOrderListOTOParams, NewOrderListOTOResponse, NewSpotOrderParams, NewSpotSOROrderParams, NextHourlyInterestRate, NftAsset, NftDeposit, NftTransaction, NftWithdraw, OnchainYieldsAccountResponse, OnchainYieldsLockedPersonalLeftQuotaParams, OnchainYieldsLockedPersonalLeftQuotaResponse, OnchainYieldsLockedPositionParams, OnchainYieldsLockedPositionResponse, OnchainYieldsLockedProductListParams, OnchainYieldsLockedProductListResponse, OnchainYieldsLockedRedeemParams, OnchainYieldsLockedRedeemResponse, OnchainYieldsLockedRedemptionRecordParams, OnchainYieldsLockedRedemptionRecordResponse, OnchainYieldsLockedRewardsHistoryParams, OnchainYieldsLockedRewardsHistoryResponse, OnchainYieldsLockedSetAutoSubscribeParams, OnchainYieldsLockedSetAutoSubscribeResponse, OnchainYieldsLockedSetRedeemOptionParams, OnchainYieldsLockedSetRedeemOptionResponse, OnchainYieldsLockedSubscribeParams, OnchainYieldsLockedSubscribeResponse, OnchainYieldsLockedSubscriptionPreviewParams, OnchainYieldsLockedSubscriptionPreviewResponse, OnchainYieldsLockedSubscriptionRecordParams, OnchainYieldsLockedSubscriptionRecordResponse, OrderBookResponse, OrderList, OrderListResponse, OrderRateLimitUsage, OrderResponseTypeFor, PMProBankruptcyLoanRepaymentHistory, PMProMintBFUSDParams, PMProMintBFUSDResponse, PMProRedeemBFUSDResponse, PortfolioMarginProAccountBalance, PortfolioMarginProSpanAccountInfo, PreventedMatch, PreventedMatchesParams, PurchaseFlexibleProductResponse, PurchaseRecordParams, QueryBrokerFuturesCommissionRebateParams, QueryBrokerSpotCommissionRebateParams, QueryCrossMarginAccountDetailsParams, QueryCrossMarginFeeDataParams, QueryCrossMarginPairResponse, QueryIsolatedMarginTierDataParams, QueryMarginAccountAllOCOParams, QueryMarginAccountTradeListParams, QueryMarginAssetResponse, QueryMarginInterestRateHistoryParams, QueryMarginPriceIndexResponse, QueryMarginRecordParams, QueryMaxBorrowResponse, QueryMaxTransferOutAmountResponse, QuerySubAccountCoinFuturesCommissionParams, QuerySubAccountFuturesAssetInfoParams, QuerySubAccountFuturesCommissionParams, QuerySubAccountSpotMarginAssetInfoParams, RawAccountTrade, RawTrade, RedeemBlvtParams, RedeemBlvtResponse, RedeemEthParams, RedeemEthResponse, RedeemGiftCardParams, RedeemSolResponse, RemoveBSwapLiquidityParams, RepayCryptoFlexibleLoanParams, RepayCryptoFlexibleLoanResponse, RepayCryptoLoanFlexibleWithCollateralParams, RepayCryptoLoanFlexibleWithCollateralResponse, RepayCryptoLoanParams, RepayCryptoLoanResponse, ReplaceSpotOrderParams, ReplaceSpotOrderResultSuccess, RollingWindowTickerParams, SetAutoSubscribeParams, SimpleEarnAccountResponse, SimpleEarnFlexibleProduct, SimpleEarnFlexibleProductPositionParams, SimpleEarnLockedProduct, SimpleEarnLockedProductPosition, SimpleEarnLockedProductPositionParams, SimpleEarnProductListParams, SimpleEarnRedeemFlexibleProductParams, SimpleEarnRedeemResponse, SimpleEarnSubscribeFlexibleProductResponse, SimpleEarnSubscribeLockedProductResponse, SimpleEarnSubscribeProductParams, SmallLiabilityExchangeCoin, SmallLiabilityExchangeHistory, SolBoostRewardsHistoryRecord, SolBoostRewardsHistoryReq, SolRedemptionHistoryRecord, SolStakingAccount, SolStakingHistoryRecord, SolStakingQuota, SOROrderResponseFull, SORTestOrderResponse, SpecialLowLatencyKeyInfo, SpecialLowLatencyKeyResponse, SpotAlgoOrder, SpotAmendKeepPriorityResult, SpotOrder, StakingBasicParams, StakingHistory, StakingHistoryParams, StakingPersonalLeftQuota, StakingProduct, StakingProductPosition, StakingProductType, SubAccountAddOrDeleteIPList, SubAccountAssetDetails, SubAccountAssets, SubAccountAssetsParams, SubaccountBalances, SubAccountBrokerMarginAsset, SubaccountBrokerSpotAsset, SubAccountCOINMDetail, SubAccountCOINMPositionRisk, SubAccountCOINMSummary, SubAccountDeposit, SubAccountDepositAddress, SubAccountDepositAddressParams, SubAccountDepositHistoryList, SubAccountDepositHistoryParams, SubAccountEnableFutures, SubAccountEnableLeverageToken, SubAccountEnableMargin, SubAccountEnableOrDisableIPRestriction, SubAccountFuturesAccountDetail, SubAccountFuturesAccountSummary, SubAccountFuturesAssetTransfer, SubAccountFuturesAssetTransferHistory, SubAccountFuturesAssetTransferHistoryParams, SubAccountFuturesAssetTransferParams, SubAccountListParams, SubAccountListResponse, SubAccountMarginAccountDetail, SubAccountMovePosition, SubAccountMovePositionHistory, SubAccountMovePositionHistoryParams, SubAccountMovePositionParams, SubAccountsMarginAccountSummary, SubAccountSpotAssetsSummary, SubAccountSpotAssetsSummaryParams, SubAccountSpotAssetTransferHistory, SubAccountSpotAssetTransferHistoryParams, SubAccountStatus, SubAccountSummaryOnFuturesAccountV2Params, SubAccountTransactionStatistics, SubAccountTransfer, SubAccountTransferHistory, SubAccountTransferHistoryParams, SubAccountTransferParams, SubAccountTransferToMasterParams, SubAccountTransferToSameMasterParams, SubAccountUniversalTransfer, SubAccountUniversalTransferHistoryParams, SubAccountUniversalTransferHistoryResponse, SubAccountUniversalTransferParams, SubAccountUSDMDetail, SubAccountUSDMPositionRisk, SubAccountUSDMSummary, SubmitConvertLimitOrderParams, SubmitDepositCreditParams, SubmitDepositCreditResponse, SubmitHashrateResaleParams, SubmitIndexLinkedPlanRedemptionParams, SubmitMarginOTOCOOrderParams, SubmitMarginOTOOrderParams, SubmitOneTimeTransactionParams, SubmitOneTimeTransactionResponse, SubmitSpotTwapNewOrderParams, SubmitSpotTwapNewOrderResponse, SubmitTravelRuleDepositQuestionnaireParams, SubmitTravelRuleDepositQuestionnaireResponse, SubmitTwapNewOrderParams, SubmitTwapNewOrderResponse, SubmitVpNewOrderParams, SubmitVpNewOrderResponse, SubscribeBlvtParams, SubscribeBlvtResponse, SubscribeDualInvestmentProductParams, SubscribeDualInvestmentProductResponse, SubscribeEthStakingV2Response, SubscribeSolStakingResponse, SymbolOrderBookTicker, SymbolTradeFee, SystemStatusResponse, TargetAssetROI, Ticker24hrResponse, ToggleBNBBurnParams, TradingDayTickerArray, TradingDayTickerFull, TradingDayTickerMini, TradingDayTickerParams, TradingDayTickerSingle, TransferBrokerSubAccount, TransferBrokerSubAccountParams, TravelRuleDepositHistoryRecord, TravelRuleWithdrawHistoryRecord, UniversalTransferBrokerParams, UniversalTransferHistoryParams, UniversalTransferParams, UpdateIpRestrictionForSubApiKey, UsdtMarginedFuturesResponse, UserAsset, VASPInfo, VipCollateralAccount, VipLoanAccruedInterestParams, VipLoanAccruedInterestRecord, VipLoanBorrowParams, VipLoanBorrowResponse, VipLoanInterestRateHistoryParams, VipLoanInterestRateRecord, VipLoanRenewParams, VipLoanRenewResponse, VipLoanRepaymentHistory, VipLoanRepayParams, VipLoanRepayResponse, VipOngoingOrder, VirtualSubAccount, WalletBalance, WithdrawAddress, WithdrawAssetsFromManagedSubAccountParams, WithdrawHistory, WithdrawHistoryParams, WithdrawParams, WithdrawTravelRuleParams, WrapBethResponse, WrapHistory } from './types/spot';
|
|
4
4
|
import BaseRestClient from './util/BaseRestClient';
|
|
5
5
|
import { RestClientOptions } from './util/requestUtils';
|
|
6
6
|
export declare class MainClient extends BaseRestClient {
|
|
@@ -69,6 +69,12 @@ export declare class MainClient extends BaseRestClient {
|
|
|
69
69
|
symbol: string;
|
|
70
70
|
}): Promise<CancelSpotOrderResult[]>;
|
|
71
71
|
replaceOrder<T extends OrderType, RT extends OrderResponseType | undefined = undefined>(params: ReplaceSpotOrderParams<T, RT>): Promise<ReplaceSpotOrderResultSuccess<T, RT>>;
|
|
72
|
+
/**
|
|
73
|
+
* Reduce the quantity of an existing open order while keeping its priority in the order book.
|
|
74
|
+
* The new quantity must be less than the current quantity.
|
|
75
|
+
* https://binance-docs.github.io/apidocs/futures/en/#order-amend-keep-priority-trade
|
|
76
|
+
*/
|
|
77
|
+
amendOrderKeepPriority(params: AmendKeepPriorityParams): Promise<SpotAmendKeepPriorityResult>;
|
|
72
78
|
getOpenOrders(params?: {
|
|
73
79
|
symbol?: string;
|
|
74
80
|
}): Promise<SpotOrder[]>;
|
|
@@ -467,10 +473,18 @@ export declare class MainClient extends BaseRestClient {
|
|
|
467
473
|
createVirtualSubAccount(params: CreateSubAccountParams): Promise<VirtualSubAccount>;
|
|
468
474
|
getSubAccountList(params?: SubAccountListParams): Promise<SubAccountListResponse>;
|
|
469
475
|
subAccountEnableFutures(email: string): Promise<SubAccountEnableFutures>;
|
|
476
|
+
/**
|
|
477
|
+
* @deprecated as of 2025-06-03
|
|
478
|
+
* User now should make the initial transfer in the Margin account to enable it.
|
|
479
|
+
*/
|
|
470
480
|
subAccountEnableMargin(email: string): Promise<SubAccountEnableMargin>;
|
|
471
481
|
enableOptionsForSubAccount(params: {
|
|
472
482
|
email: string;
|
|
473
483
|
}): Promise<EnableOptionsForSubAccountResponse>;
|
|
484
|
+
/**
|
|
485
|
+
* @deprecated as of 2025-06-03
|
|
486
|
+
* User now should make the initial transfer in the Margin account to enable it.
|
|
487
|
+
*/
|
|
474
488
|
subAccountEnableLeverageToken(params: SubAccountEnableLeverageToken): Promise<SubAccountEnableLeverageToken>;
|
|
475
489
|
getSubAccountStatusOnMarginOrFutures(params?: {
|
|
476
490
|
email?: string;
|
|
@@ -772,6 +786,33 @@ export declare class MainClient extends BaseRestClient {
|
|
|
772
786
|
amount: string;
|
|
773
787
|
rewardsAsset: string;
|
|
774
788
|
}[]>;
|
|
789
|
+
/**
|
|
790
|
+
*
|
|
791
|
+
* STAKING - Onchain Yields - Account
|
|
792
|
+
*
|
|
793
|
+
**/
|
|
794
|
+
getOnchainYieldsLockedProducts(params?: OnchainYieldsLockedProductListParams): Promise<OnchainYieldsLockedProductListResponse>;
|
|
795
|
+
getOnchainYieldsLockedPersonalLeftQuota(params: OnchainYieldsLockedPersonalLeftQuotaParams): Promise<OnchainYieldsLockedPersonalLeftQuotaResponse>;
|
|
796
|
+
getOnchainYieldsLockedPosition(params?: OnchainYieldsLockedPositionParams): Promise<OnchainYieldsLockedPositionResponse>;
|
|
797
|
+
getOnchainYieldsAccount(): Promise<OnchainYieldsAccountResponse>;
|
|
798
|
+
/**
|
|
799
|
+
*
|
|
800
|
+
* STAKING - Onchain Yields - Earn
|
|
801
|
+
*
|
|
802
|
+
**/
|
|
803
|
+
getOnchainYieldsLockedSubscriptionPreview(params: OnchainYieldsLockedSubscriptionPreviewParams): Promise<OnchainYieldsLockedSubscriptionPreviewResponse>;
|
|
804
|
+
subscribeOnchainYieldsLockedProduct(params: OnchainYieldsLockedSubscribeParams): Promise<OnchainYieldsLockedSubscribeResponse>;
|
|
805
|
+
setOnchainYieldsLockedAutoSubscribe(params: OnchainYieldsLockedSetAutoSubscribeParams): Promise<OnchainYieldsLockedSetAutoSubscribeResponse>;
|
|
806
|
+
setOnchainYieldsLockedRedeemOption(params: OnchainYieldsLockedSetRedeemOptionParams): Promise<OnchainYieldsLockedSetRedeemOptionResponse>;
|
|
807
|
+
redeemOnchainYieldsLockedProduct(params: OnchainYieldsLockedRedeemParams): Promise<OnchainYieldsLockedRedeemResponse>;
|
|
808
|
+
/**
|
|
809
|
+
*
|
|
810
|
+
* STAKING - Onchain Yields - History
|
|
811
|
+
*
|
|
812
|
+
**/
|
|
813
|
+
getOnchainYieldsLockedSubscriptionRecord(params?: OnchainYieldsLockedSubscriptionRecordParams): Promise<OnchainYieldsLockedSubscriptionRecordResponse>;
|
|
814
|
+
getOnchainYieldsLockedRewardsHistory(params?: OnchainYieldsLockedRewardsHistoryParams): Promise<OnchainYieldsLockedRewardsHistoryResponse>;
|
|
815
|
+
getOnchainYieldsLockedRedemptionRecord(params?: OnchainYieldsLockedRedemptionRecordParams): Promise<OnchainYieldsLockedRedemptionRecordResponse>;
|
|
775
816
|
/**
|
|
776
817
|
*
|
|
777
818
|
* COPY TRADING Endpoints - Future copy trading
|
|
@@ -1242,6 +1283,35 @@ export declare class MainClient extends BaseRestClient {
|
|
|
1242
1283
|
targetAsset: string;
|
|
1243
1284
|
amount: number;
|
|
1244
1285
|
}): Promise<PMProRedeemBFUSDResponse>;
|
|
1286
|
+
getPortfolioMarginBankruptcyLoanRepayHistory(params?: {
|
|
1287
|
+
startTime?: number;
|
|
1288
|
+
endTime?: number;
|
|
1289
|
+
current?: number;
|
|
1290
|
+
size?: number;
|
|
1291
|
+
}): Promise<{
|
|
1292
|
+
total: number;
|
|
1293
|
+
rows: PMProBankruptcyLoanRepaymentHistory[];
|
|
1294
|
+
}>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Transfer LDUSDT as collateral for all types of Portfolio Margin account
|
|
1297
|
+
*/
|
|
1298
|
+
transferLDUSDTPortfolioMargin(params: {
|
|
1299
|
+
asset: string;
|
|
1300
|
+
transferType: 'EARN_TO_FUTURE' | 'FUTURE_TO_EARN';
|
|
1301
|
+
amount: number;
|
|
1302
|
+
}): Promise<{
|
|
1303
|
+
msg: string;
|
|
1304
|
+
}>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Get transferable earn asset balance for all types of Portfolio Margin account
|
|
1307
|
+
*/
|
|
1308
|
+
getTransferableEarnAssetBalanceForPortfolioMargin(params: {
|
|
1309
|
+
asset: string;
|
|
1310
|
+
transferType: 'EARN_TO_FUTURE' | 'FUTURE_TO_EARN';
|
|
1311
|
+
}): Promise<{
|
|
1312
|
+
asset: string;
|
|
1313
|
+
amount: string;
|
|
1314
|
+
}>;
|
|
1245
1315
|
/**
|
|
1246
1316
|
*
|
|
1247
1317
|
* DERIVATIVES - Futures Data - Market
|
|
@@ -1272,6 +1342,23 @@ export declare class MainClient extends BaseRestClient {
|
|
|
1272
1342
|
* Found only in old docs, possibly @deprecated
|
|
1273
1343
|
**/
|
|
1274
1344
|
getPayTransactions(params: GetPayTradeHistoryParams): Promise<any>;
|
|
1345
|
+
/**
|
|
1346
|
+
*
|
|
1347
|
+
* INSTITUTIONAL LOAN - Account Endpoints
|
|
1348
|
+
*
|
|
1349
|
+
**/
|
|
1350
|
+
getInstLoanRiskUnit(params?: GetInstitutionalLoanRiskUnitDetailsParams): Promise<InstitutionalLoanRiskUnitDetails[]>;
|
|
1351
|
+
closeInstLoanRiskUnit(): Promise<CloseInstitutionalLoanRiskUnitResponse>;
|
|
1352
|
+
addInstLoanCollateralAccount(params: AddInstitutionalLoanCollateralAccountParams): Promise<object>;
|
|
1353
|
+
getActiveInstLoanRiskUnits(): Promise<ActiveInstitutionalLoanRiskUnit[]>;
|
|
1354
|
+
/**
|
|
1355
|
+
*
|
|
1356
|
+
* INSTITUTIONAL LOAN - Borrow/Repay Endpoints
|
|
1357
|
+
*
|
|
1358
|
+
**/
|
|
1359
|
+
borrowInstitutionalLoan(params: InstitutionalLoanBorrowParams): Promise<InstitutionalLoanBorrowResponse>;
|
|
1360
|
+
getInstLoanInterestHistory(params?: GetInstitutionalLoanInterestHistoryParams): Promise<InstitutionalLoanInterestHistoryResponse>;
|
|
1361
|
+
repayInstitutionalLoan(params: InstitutionalLoanRepayParams): Promise<InstitutionalLoanRepayResponse>;
|
|
1275
1362
|
/**
|
|
1276
1363
|
*
|
|
1277
1364
|
* EXCHANGE LINK - Account Endpoints
|
|
@@ -1334,6 +1421,17 @@ export declare class MainClient extends BaseRestClient {
|
|
|
1334
1421
|
spotBNBBurn: boolean;
|
|
1335
1422
|
interestBNBBurn: boolean;
|
|
1336
1423
|
}>;
|
|
1424
|
+
/**
|
|
1425
|
+
* Caution:
|
|
1426
|
+
* The operation will delete a sub account under your brokerage master account.
|
|
1427
|
+
* Please transfer out all funds from the sub account and delete API key of the sub account before deleting it.
|
|
1428
|
+
* The deleted sub account CANNOT be reverted.
|
|
1429
|
+
* The daily deletion limit for a broker Master is 20 sub accounts.
|
|
1430
|
+
* You need to enable "trade" option for the api key which requests this endpoint.
|
|
1431
|
+
*/
|
|
1432
|
+
deleteBrokerSubAccount(params: {
|
|
1433
|
+
subAccountId: string;
|
|
1434
|
+
}): Promise<any>;
|
|
1337
1435
|
/**
|
|
1338
1436
|
*
|
|
1339
1437
|
* EXCHANGE LINK - Account Endpoints
|
package/lib/main-client.js
CHANGED
|
@@ -65,7 +65,7 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
65
65
|
One way: ${estimatedOneWayLatency}ms.
|
|
66
66
|
Round trip: ${roundTripTime}ms.
|
|
67
67
|
`);
|
|
68
|
-
if (timeDifference > 500) {
|
|
68
|
+
if (Math.abs(timeDifference) > 500) {
|
|
69
69
|
console.warn(`WARNING! Time difference between server and client clock is greater than 500ms. It is currently ${timeDifference}ms.
|
|
70
70
|
Consider adjusting your system clock to avoid unwanted clock sync errors!
|
|
71
71
|
Visit https://github.com/tiagosiebler/awesome-crypto-examples/wiki/Timestamp-for-this-request-is-outside-of-the-recvWindow for more information`);
|
|
@@ -198,6 +198,15 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
198
198
|
replaceOrder(params) {
|
|
199
199
|
return this.postPrivate('api/v3/order/cancelReplace', params);
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Reduce the quantity of an existing open order while keeping its priority in the order book.
|
|
203
|
+
* The new quantity must be less than the current quantity.
|
|
204
|
+
* https://binance-docs.github.io/apidocs/futures/en/#order-amend-keep-priority-trade
|
|
205
|
+
*/
|
|
206
|
+
amendOrderKeepPriority(params) {
|
|
207
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
208
|
+
return this.putPrivate('fapi/v1/order/amend/keepPriority', params);
|
|
209
|
+
}
|
|
201
210
|
getOpenOrders(params) {
|
|
202
211
|
return this.getPrivate('api/v3/openOrders', params);
|
|
203
212
|
}
|
|
@@ -776,12 +785,20 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
776
785
|
subAccountEnableFutures(email) {
|
|
777
786
|
return this.postPrivate('sapi/v1/sub-account/futures/enable', { email });
|
|
778
787
|
}
|
|
788
|
+
/**
|
|
789
|
+
* @deprecated as of 2025-06-03
|
|
790
|
+
* User now should make the initial transfer in the Margin account to enable it.
|
|
791
|
+
*/
|
|
779
792
|
subAccountEnableMargin(email) {
|
|
780
793
|
return this.postPrivate('sapi/v1/sub-account/margin/enable', { email });
|
|
781
794
|
}
|
|
782
795
|
enableOptionsForSubAccount(params) {
|
|
783
796
|
return this.postPrivate('sapi/v1/sub-account/eoptions/enable', params);
|
|
784
797
|
}
|
|
798
|
+
/**
|
|
799
|
+
* @deprecated as of 2025-06-03
|
|
800
|
+
* User now should make the initial transfer in the Margin account to enable it.
|
|
801
|
+
*/
|
|
785
802
|
subAccountEnableLeverageToken(params) {
|
|
786
803
|
return this.postPrivate('sapi/v1/sub-account/blvt/enable', params);
|
|
787
804
|
}
|
|
@@ -1196,6 +1213,57 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1196
1213
|
getSolUnclaimedRewards() {
|
|
1197
1214
|
return this.getPrivate('sapi/v1/sol-staking/sol/history/unclaimedRewards');
|
|
1198
1215
|
}
|
|
1216
|
+
/**
|
|
1217
|
+
*
|
|
1218
|
+
* STAKING - Onchain Yields - Account
|
|
1219
|
+
*
|
|
1220
|
+
**/
|
|
1221
|
+
getOnchainYieldsLockedProducts(params) {
|
|
1222
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/list', params);
|
|
1223
|
+
}
|
|
1224
|
+
getOnchainYieldsLockedPersonalLeftQuota(params) {
|
|
1225
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/personalLeftQuota', params);
|
|
1226
|
+
}
|
|
1227
|
+
getOnchainYieldsLockedPosition(params) {
|
|
1228
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/position', params);
|
|
1229
|
+
}
|
|
1230
|
+
getOnchainYieldsAccount() {
|
|
1231
|
+
return this.getPrivate('sapi/v1/onchain-yields/account');
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
*
|
|
1235
|
+
* STAKING - Onchain Yields - Earn
|
|
1236
|
+
*
|
|
1237
|
+
**/
|
|
1238
|
+
getOnchainYieldsLockedSubscriptionPreview(params) {
|
|
1239
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/subscriptionPreview', params);
|
|
1240
|
+
}
|
|
1241
|
+
subscribeOnchainYieldsLockedProduct(params) {
|
|
1242
|
+
return this.postPrivate('sapi/v1/onchain-yields/locked/subscribe', params);
|
|
1243
|
+
}
|
|
1244
|
+
setOnchainYieldsLockedAutoSubscribe(params) {
|
|
1245
|
+
return this.postPrivate('sapi/v1/onchain-yields/locked/setAutoSubscribe', params);
|
|
1246
|
+
}
|
|
1247
|
+
setOnchainYieldsLockedRedeemOption(params) {
|
|
1248
|
+
return this.postPrivate('sapi/v1/onchain-yields/locked/setRedeemOption', params);
|
|
1249
|
+
}
|
|
1250
|
+
redeemOnchainYieldsLockedProduct(params) {
|
|
1251
|
+
return this.postPrivate('sapi/v1/onchain-yields/locked/redeem', params);
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
*
|
|
1255
|
+
* STAKING - Onchain Yields - History
|
|
1256
|
+
*
|
|
1257
|
+
**/
|
|
1258
|
+
getOnchainYieldsLockedSubscriptionRecord(params) {
|
|
1259
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/history/subscriptionRecord', params);
|
|
1260
|
+
}
|
|
1261
|
+
getOnchainYieldsLockedRewardsHistory(params) {
|
|
1262
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/history/rewardsRecord', params);
|
|
1263
|
+
}
|
|
1264
|
+
getOnchainYieldsLockedRedemptionRecord(params) {
|
|
1265
|
+
return this.getPrivate('sapi/v1/onchain-yields/locked/history/redemptionRecord', params);
|
|
1266
|
+
}
|
|
1199
1267
|
/**
|
|
1200
1268
|
*
|
|
1201
1269
|
* COPY TRADING Endpoints - Future copy trading
|
|
@@ -1716,6 +1784,21 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1716
1784
|
redeemPortfolioMarginBFUSD(params) {
|
|
1717
1785
|
return this.postPrivate('sapi/v1/portfolio/redeem', params);
|
|
1718
1786
|
}
|
|
1787
|
+
getPortfolioMarginBankruptcyLoanRepayHistory(params) {
|
|
1788
|
+
return this.getPrivate('sapi/v1/portfolio/pmLoan-history', params);
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Transfer LDUSDT as collateral for all types of Portfolio Margin account
|
|
1792
|
+
*/
|
|
1793
|
+
transferLDUSDTPortfolioMargin(params) {
|
|
1794
|
+
return this.postPrivate('sapi/v1/portfolio/earn-asset-transfer', params);
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Get transferable earn asset balance for all types of Portfolio Margin account
|
|
1798
|
+
*/
|
|
1799
|
+
getTransferableEarnAssetBalanceForPortfolioMargin(params) {
|
|
1800
|
+
return this.getPrivate('sapi/v1/portfolio/earn-asset-balance', params);
|
|
1801
|
+
}
|
|
1719
1802
|
/**
|
|
1720
1803
|
*
|
|
1721
1804
|
* DERIVATIVES - Futures Data - Market
|
|
@@ -1756,6 +1839,37 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1756
1839
|
getPayTransactions(params) {
|
|
1757
1840
|
return this.getPrivate('sapi/v1/pay/transactions', params);
|
|
1758
1841
|
}
|
|
1842
|
+
/**
|
|
1843
|
+
*
|
|
1844
|
+
* INSTITUTIONAL LOAN - Account Endpoints
|
|
1845
|
+
*
|
|
1846
|
+
**/
|
|
1847
|
+
getInstLoanRiskUnit(params) {
|
|
1848
|
+
return this.getPrivate('sapi/v1/margin/loan-group/ltv-details', params);
|
|
1849
|
+
}
|
|
1850
|
+
closeInstLoanRiskUnit() {
|
|
1851
|
+
return this.deletePrivate('sapi/v1/margin/loan-group');
|
|
1852
|
+
}
|
|
1853
|
+
addInstLoanCollateralAccount(params) {
|
|
1854
|
+
return this.postPrivate('sapi/v1/margin/loan-group/edit-member', params);
|
|
1855
|
+
}
|
|
1856
|
+
getActiveInstLoanRiskUnits() {
|
|
1857
|
+
return this.getPrivate('sapi/v1/margin/loan-groups/activated');
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
*
|
|
1861
|
+
* INSTITUTIONAL LOAN - Borrow/Repay Endpoints
|
|
1862
|
+
*
|
|
1863
|
+
**/
|
|
1864
|
+
borrowInstitutionalLoan(params) {
|
|
1865
|
+
return this.postPrivate('sapi/v1/margin/loan-group/borrow', params);
|
|
1866
|
+
}
|
|
1867
|
+
getInstLoanInterestHistory(params) {
|
|
1868
|
+
return this.getPrivate('sapi/v1/margin/loan-group/interest-history', params);
|
|
1869
|
+
}
|
|
1870
|
+
repayInstitutionalLoan(params) {
|
|
1871
|
+
return this.postPrivate('sapi/v1/margin/loan-group/repay', params);
|
|
1872
|
+
}
|
|
1759
1873
|
/**
|
|
1760
1874
|
*
|
|
1761
1875
|
* EXCHANGE LINK - Account Endpoints
|
|
@@ -1809,6 +1923,17 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1809
1923
|
getSubAccountBNBBurnStatus(params) {
|
|
1810
1924
|
return this.getPrivate('sapi/v1/broker/subAccount/bnbBurn/status', params);
|
|
1811
1925
|
}
|
|
1926
|
+
/**
|
|
1927
|
+
* Caution:
|
|
1928
|
+
* The operation will delete a sub account under your brokerage master account.
|
|
1929
|
+
* Please transfer out all funds from the sub account and delete API key of the sub account before deleting it.
|
|
1930
|
+
* The deleted sub account CANNOT be reverted.
|
|
1931
|
+
* The daily deletion limit for a broker Master is 20 sub accounts.
|
|
1932
|
+
* You need to enable "trade" option for the api key which requests this endpoint.
|
|
1933
|
+
*/
|
|
1934
|
+
deleteBrokerSubAccount(params) {
|
|
1935
|
+
return this.deletePrivate('/sapi/v1/broker/subAccount', params);
|
|
1936
|
+
}
|
|
1812
1937
|
/**
|
|
1813
1938
|
*
|
|
1814
1939
|
* EXCHANGE LINK - Account Endpoints
|