Comparing version 2.0.39 to 2.0.40
import { AxiosRequestConfig } from 'axios'; | ||
import { BasicAssetParam, BasicAssetPaginatedParams, BasicSymbolParam, BinanceBaseUrlKey, GetOrderParams, OrderBookParams, HistoricalTradesParams, KlinesParams, RecentTradesParams, CancelOrderParams, CancelOCOParams, GetAllOrdersParams, NewOCOParams, SymbolFromPaginatedRequestFromId, ExchangeSymbol } from './types/shared'; | ||
import { AllCoinsInformationResponse, DailyAccountSnapshotParams, DailyAccountSnapshot, DepositHistoryParams, SystemStatusResponse, WithdrawParams, DepositHistory, WithdrawHistoryParams, WithdrawHistory, DepositAddressResponse, ConvertDustParams, DepositAddressParams, BasicTimeRangeParam, UniversalTransferParams, UniversalTransferHistoryParams, ExchangeInfoParams, NewSpotOrderParams, GetOCOParams, BasicFromPaginatedParams, APITradingStatus, AssetDetail, SymbolTradeFee, APIPermissions, ExchangeInfo, OrderBookResponse, RawTrade, AggregateTrade, CurrentAvgPrice, DailyChangeStatistic, SymbolPrice, SymbolOrderBookTicker, OrderResponseACK, OrderResponseResult, OrderResponseFull, CancelSpotOrderResult, SpotOrder, AccountInformation, RawAccountTrade, MarginAccountLoanParams, MarginTransactionResponse, CrossMarginAccountTransferParams, QueryMarginAssetParams, QueryMarginAssetResponse, QueryCrossMarginPairParams, QueryCrossMarginPairResponse, QueryMarginPriceIndexResponse, MarginRecordResponse, QueryMarginRecordParams, QueryCrossMarginAccountDetailsParams, QueryMaxBorrowResponse, BasicMarginAssetParams, QueryMaxTransferOutAmountResponse, IsolatedMarginAccountTransferParams, SubAccountFuturesAssetTransferParams, SubAccountStatus, FuturesPositionRisk, SubAccountTransferHistory, SubAccountTransferHistoryParams, SubAccountUniversalTransferParams, EnableOrDisableIPRestrictionForSubAccountParams, BasicSubAccount, SubAccountAssetDetails, WithdrawAssetsFromManagedSubAccountParams, VirtualSubAccount, SubAccountListResponse, SubAccountSpotAssetTransferHistory, SubAccountFuturesAssetTransferHistory, SubAccountFuturesAssetTransfer, SubAccountAssets, SubAccountSpotAssetsSummary, SubAccountDepositAddress, SubAccountEnableMargin, SubAccountMarginAccountDetail, SubAccountsMarginAccountSummary, SubAccountEnableFutures, SubAccountFuturesAccountDetail, SubAccountFuturesAccountSummary, SubAccountTransfer, SubAccountUniversalTransfer, SubAccountUniversalTransferHistoryResponse, SubAccountEnableLeverageToken, SubAccountnableOrDisableIPRestriction, SubAccountAddOrDeleteIPList, SubAccountTransferParams, SubAccountTransferToMasterParams, CreateSubAccountParams, SubAccountTransferToSameMasterParams, SubAccountCOINMDetail, SubAccountUSDMDetail, SubAccountCOINMSummary, SubAccountUSDMSummary, BasicFuturesSubAccountParams, SubAccountCOINMPositionRisk, SubAccountUSDMPositionRisk, SubAccountListParams, SubAccountSpotAssetTransferHistoryParams, SubAccountFuturesAssetTransferHistoryParams, SubAccountAssetsParams, SubAccountSpotAssetsSummaryParams, SubAccountDepositAddressParams, SubAccountDepositHistoryParams, SubAccountUniversalTransferHistoryParams, SubAccountSummaryOnFuturesAccountV2Params, StakingProduct, StakingProductType, StakingProductPosition, StakingBasicParams, StakingHistoryParams, StakingHistory, StakingPersonalLeftQuota, IsolatedMarginAccountInfo } from './types/spot'; | ||
import { BasicAssetPaginatedParams, BasicAssetParam, BasicSymbolParam, BinanceBaseUrlKey, CancelOCOParams, CancelOrderParams, ExchangeSymbol, GetAllOrdersParams, GetOrderParams, HistoricalTradesParams, KlinesParams, NewOCOParams, OrderBookParams, RecentTradesParams, SymbolFromPaginatedRequestFromId } from './types/shared'; | ||
import { AccountInformation, AddBSwapLiquidityParams, AggregateTrade, AllCoinsInformationResponse, APIPermissions, APITradingStatus, AssetDetail, BasicBSwapResp, BasicFromPaginatedParams, BasicFuturesSubAccountParams, BasicMarginAssetParams, BasicSubAccount, BasicTimeRangeParam, BSwapLiquidity, BSwapOperations, BSwapOperationsParams, CancelSpotOrderResult, ConvertDustParams, CreateSubAccountParams, CrossMarginAccountTransferParams, CurrentAvgPrice, DailyAccountSnapshot, DailyAccountSnapshotParams, DailyChangeStatistic, DepositAddressParams, DepositAddressResponse, DepositHistory, DepositHistoryParams, DustConversion, DustInfo, DustLog, EnableOrDisableIPRestrictionForSubAccountParams, ExchangeInfo, ExchangeInfoParams, FuturesPositionRisk, GetOCOParams, IsolatedMarginAccountInfo, IsolatedMarginAccountTransferParams, MarginAccountLoanParams, MarginRecordResponse, MarginTransactionResponse, NewSpotOrderParams, OrderBookResponse, OrderResponseACK, OrderResponseFull, OrderResponseResult, QueryCrossMarginAccountDetailsParams, QueryCrossMarginPairParams, QueryCrossMarginPairResponse, QueryMarginAssetParams, QueryMarginAssetResponse, QueryMarginPriceIndexResponse, QueryMarginRecordParams, QueryMaxBorrowResponse, QueryMaxTransferOutAmountResponse, RawAccountTrade, RawTrade, RemoveBSwapLiquidityParams, SpotOrder, StakingBasicParams, StakingHistory, StakingHistoryParams, StakingPersonalLeftQuota, StakingProduct, StakingProductPosition, StakingProductType, SubAccountAddOrDeleteIPList, SubAccountAssetDetails, SubAccountAssets, SubAccountAssetsParams, SubAccountCOINMDetail, SubAccountCOINMPositionRisk, SubAccountCOINMSummary, SubAccountDepositAddress, SubAccountDepositAddressParams, SubAccountDepositHistoryParams, SubAccountEnableFutures, SubAccountEnableLeverageToken, SubAccountEnableMargin, SubAccountFuturesAccountDetail, SubAccountFuturesAccountSummary, SubAccountFuturesAssetTransfer, SubAccountFuturesAssetTransferHistory, SubAccountFuturesAssetTransferHistoryParams, SubAccountFuturesAssetTransferParams, SubAccountListParams, SubAccountListResponse, SubAccountMarginAccountDetail, SubAccountnableOrDisableIPRestriction, SubAccountsMarginAccountSummary, SubAccountSpotAssetsSummary, SubAccountSpotAssetsSummaryParams, SubAccountSpotAssetTransferHistory, SubAccountSpotAssetTransferHistoryParams, SubAccountStatus, SubAccountSummaryOnFuturesAccountV2Params, SubAccountTransfer, SubAccountTransferHistory, SubAccountTransferHistoryParams, SubAccountTransferParams, SubAccountTransferToMasterParams, SubAccountTransferToSameMasterParams, SubAccountUniversalTransfer, SubAccountUniversalTransferHistoryParams, SubAccountUniversalTransferHistoryResponse, SubAccountUniversalTransferParams, SubAccountUSDMDetail, SubAccountUSDMPositionRisk, SubAccountUSDMSummary, SymbolOrderBookTicker, SymbolPrice, SymbolTradeFee, SystemStatusResponse, UniversalTransferHistoryParams, UniversalTransferParams, VirtualSubAccount, WithdrawAssetsFromManagedSubAccountParams, WithdrawHistory, WithdrawHistoryParams, WithdrawParams } from './types/spot'; | ||
import { RestClientOptions } from './util/requestUtils'; | ||
@@ -31,4 +31,5 @@ import BaseRestClient from './util/BaseRestClient'; | ||
}>; | ||
getDustLog(params?: BasicTimeRangeParam): Promise<any>; | ||
convertDustToBnb(params: ConvertDustParams): Promise<any>; | ||
getDustLog(params?: BasicTimeRangeParam): Promise<DustLog>; | ||
convertDustToBnb(params: ConvertDustParams): Promise<DustConversion>; | ||
getDust(): Promise<DustInfo>; | ||
getAssetDividendRecord(params?: BasicAssetPaginatedParams): Promise<any>; | ||
@@ -231,2 +232,8 @@ getAssetDetail(params?: Partial<BasicAssetParam>): Promise<Record<ExchangeSymbol, AssetDetail>>; | ||
**/ | ||
getBSwapLiquidity(params?: { | ||
poolId: number; | ||
}): Promise<BSwapLiquidity[]>; | ||
addBSwapLiquidity(params: AddBSwapLiquidityParams): Promise<BasicBSwapResp>; | ||
removeBSwapLiquidity(params: RemoveBSwapLiquidityParams): Promise<BasicBSwapResp>; | ||
getBSwapOperations(params?: BSwapOperationsParams): Promise<BSwapOperations[]>; | ||
/** | ||
@@ -233,0 +240,0 @@ * Validate syntax meets requirements set by binance. Log warning if not. |
@@ -75,2 +75,5 @@ "use strict"; | ||
} | ||
getDust() { | ||
return this.postPrivate('sapi/v1/asset/dust-btc'); | ||
} | ||
getAssetDividendRecord(params) { | ||
@@ -520,3 +523,15 @@ return this.getPrivate('sapi/v1/asset/assetDividend', params); | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#bswap-endpoints | ||
getBSwapLiquidity(params) { | ||
return this.getPrivate('sapi/v1/bswap/liquidity'); | ||
} | ||
addBSwapLiquidity(params) { | ||
return this.postPrivate('sapi/v1/bswap/liquidityAdd'); | ||
} | ||
removeBSwapLiquidity(params) { | ||
return this.postPrivate('sapi/v1/bswap/liquidityRemove'); | ||
} | ||
getBSwapOperations(params) { | ||
return this.getPrivate('sapi/v1/bswap/liquidityOps'); | ||
} | ||
//TODO: add missing bswap-endpoints https://binance-docs.github.io/apidocs/spot/en/#bswap-endpoints | ||
/** | ||
@@ -523,0 +538,0 @@ * Validate syntax meets requirements set by binance. Log warning if not. |
@@ -1,2 +0,2 @@ | ||
import { ExchangeFilter, ExchangeSymbol, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter, StringBoolean, SideEffects } from './shared'; | ||
import { ExchangeFilter, ExchangeSymbol, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SideEffects, StringBoolean, SymbolFilter } from './shared'; | ||
export interface BasicTimeRangeParam { | ||
@@ -200,2 +200,49 @@ startTime?: number; | ||
} | ||
export interface DustInfoDetail { | ||
asset: string; | ||
assetFullName: string; | ||
amountFree: numberInString; | ||
toBTC: numberInString; | ||
toBNB: numberInString; | ||
toBNBOffExchange: numberInString; | ||
exchange: numberInString; | ||
} | ||
export interface DustInfo { | ||
details: DustInfoDetail[]; | ||
totalTransferBtc: numberInString; | ||
totalTransferBNB: numberInString; | ||
dribbletPercentage: numberInString; | ||
} | ||
export interface DustConversionResult { | ||
amount: numberInString; | ||
fromAsset: string; | ||
operateTime: number; | ||
serviceChargeAmount: numberInString; | ||
tranId: number; | ||
transferedAmount: numberInString; | ||
} | ||
export interface DustConversion { | ||
totalServiceCharge: numberInString; | ||
totalTransfered: numberInString; | ||
transferResult: DustConversionResult[]; | ||
} | ||
export interface UserAssetDribbletDetail { | ||
transId: number; | ||
serviceChargeAmount: numberInString; | ||
amount: numberInString; | ||
operateTime: number; | ||
transferedAmount: numberInString; | ||
fromAsset: string; | ||
} | ||
export interface UserAssetDribblet { | ||
operateTime: number; | ||
totalTransferedAmount: numberInString; | ||
totalServiceChargeAmount: numberInString; | ||
transId: number; | ||
userAssetDribbletDetails: UserAssetDribbletDetail[]; | ||
} | ||
export interface DustLog { | ||
total: number; | ||
userAssetDribblets: UserAssetDribblet[]; | ||
} | ||
export declare enum EnumUniversalTransferType { | ||
@@ -1096,1 +1143,51 @@ SpotToC2C = "MAIN_C2C", | ||
export declare type StakingProductType = 'STAKING' | 'F_DEFI' | 'L_DEFI'; | ||
export declare type BSwapType = 'SINGLE' | 'COMBINATION'; | ||
export declare type BSwapOperationType = 'ADD' | 'REMOVE'; | ||
export interface BSwapOperationsParams { | ||
operationId?: number; | ||
poolId?: number; | ||
operation: BSwapOperationType; | ||
startTime?: number; | ||
endTime?: number; | ||
limit: number; | ||
} | ||
export interface BSwapOperations { | ||
operationId: number; | ||
poolId: number; | ||
poolName: string; | ||
operation: BSwapOperationType; | ||
status: number; | ||
updateTime: number; | ||
shareAmount: numberInString; | ||
} | ||
export interface RemoveBSwapLiquidityParams { | ||
poolId: number; | ||
type: BSwapType; | ||
asset?: string; | ||
shareAmount: number; | ||
} | ||
export interface AddBSwapLiquidityParams { | ||
poolId: number; | ||
type?: BSwapType; | ||
asset: string; | ||
quantity: number; | ||
} | ||
export interface BasicBSwapResp { | ||
operationId: number; | ||
} | ||
export interface BSwapShare { | ||
shareAmount: number; | ||
sharePercentage: number; | ||
asset: { | ||
[k: string]: number; | ||
}; | ||
} | ||
export interface BSwapLiquidity { | ||
poolId: number; | ||
poolNmae: string; | ||
updateTime: number; | ||
liquidity: { | ||
[k: string]: number; | ||
}; | ||
share: BSwapShare; | ||
} |
{ | ||
"name": "binance", | ||
"version": "2.0.39", | ||
"version": "2.0.40", | ||
"description": "Node.js connector for Binance's REST APIs and WebSockets, with TypeScript & integration tests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
366795
6774