New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

binance

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binance - npm Package Compare versions

Comparing version 2.0.37 to 2.0.38

22

lib/main-client.d.ts
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 } from './types/spot';
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 { RestClientOptions } from './util/requestUtils';

@@ -156,2 +156,5 @@ import BaseRestClient from './util/BaseRestClient';

isolatedMarginAccountTransfer(params: IsolatedMarginAccountTransferParams): Promise<MarginTransactionResponse>;
getIsolatedMarginAccountInfo(params?: {
symbols?: string;
}): Promise<IsolatedMarginAccountInfo>;
/**

@@ -187,2 +190,19 @@ *

*
* Staking Endpoints
*
**/
getStakingProducts(params: StakingBasicParams & {
asset?: string;
}): Promise<StakingProduct[]>;
getStakingProductPosition(params: StakingBasicParams & {
productId?: string;
asset?: string;
}): Promise<StakingProductPosition[]>;
getStakingHistory(params: StakingHistoryParams): Promise<StakingHistory[]>;
getPersonalLeftQuotaOfStakingProduct(params: {
product: StakingProductType;
productId: string;
}): Promise<StakingPersonalLeftQuota>;
/**
*
* Savings Endpoints

@@ -189,0 +209,0 @@ *

@@ -420,3 +420,5 @@ "use strict";

// TODO - https://binance-docs.github.io/apidocs/spot/en/#get-isolated-margin-transfer-history-user_data
// TODO - https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-account-info-user_data
getIsolatedMarginAccountInfo(params) {
return this.getPrivate('sapi/v1/margin/isolated/account', { params });
}
// TODO - https://binance-docs.github.io/apidocs/spot/en/#disable-isolated-margin-account-trade

@@ -470,2 +472,22 @@ // TODO - https://binance-docs.github.io/apidocs/spot/en/#enable-isolated-margin-account-trade

*
* Staking Endpoints
*
**/
//TODO: https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data
//TODO: https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data
//TODO: https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data
getStakingProducts(params) {
return this.getPrivate(`sapi/v1/staking/productList`, params);
}
getStakingProductPosition(params) {
return this.getPrivate('sapi/v1/staking/position', params);
}
getStakingHistory(params) {
return this.getPrivate('sapi/v1/staking/stakingRecord', params);
}
getPersonalLeftQuotaOfStakingProduct(params) {
return this.getPrivate('sapi/v1/staking/personalLeftQuota', params);
}
/**
*
* Savings Endpoints

@@ -472,0 +494,0 @@ *

@@ -334,2 +334,37 @@ import { BooleanString, BooleanStringCapitalised, ExchangeFilter, KlineInterval, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter } from './shared';

}
export interface FuturesAccountAsset {
asset: string;
walletBalance: numberInString;
unrealizedProfit: numberInString;
marginBalance: numberInString;
maintMargin: numberInString;
initialMargin: numberInString;
positionInitialMargin: numberInString;
openOrderInitialMargin: numberInString;
maxWithdrawAmount: numberInString;
crossWalletBalance: numberInString;
crossUnPnl: numberInString;
availableBalance: numberInString;
marginAvailable: boolean;
updateTime: number;
}
export interface FuturesAccountPosition {
symbol: string;
initialMargin: numberInString;
maintMargin: numberInString;
unrealizedProfit: numberInString;
positionInitialMargin: numberInString;
openOrderInitialMargin: numberInString;
leverage: numberInString;
isolated: boolean;
entryPrice: numberInString;
maxNotional: numberInString;
positionSide: PositionSide;
positionAmt: numberInString;
notional: numberInString;
isolatedWallet: numberInString;
updateTime: number;
bidNotional: numberInString;
askNotional: numberInString;
}
export interface FuturesAccountInformation {

@@ -343,2 +378,13 @@ feeTier: numberInString;

totalMaintMargin: numberInString;
totalWalletBalance: numberInString;
totalUnrealizedProfit: numberInString;
totalMarginBalance: numberInString;
totalPositionInitialMargin: numberInString;
totalOpenOrderInitialMargin: numberInString;
totalCrossWalletBalance: numberInString;
totalCrossUnPnl: numberInString;
availableBalance: numberInString;
maxWithdrawAmount: numberInString;
assets: FuturesAccountAsset[];
positions: FuturesAccountPosition[];
}

@@ -345,0 +391,0 @@ export interface FuturesPosition {

@@ -601,2 +601,35 @@ import { ExchangeFilter, ExchangeSymbol, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter, StringBoolean, SideEffects } from './shared';

}
export interface IsolatedMarginAccountAsset {
asset: string;
borrowEnabled: boolean;
borrowed: numberInString;
free: numberInString;
interest: numberInString;
locked: numberInString;
netAsset: numberInString;
netAssetOfBtc: numberInString;
repayEnabled: boolean;
totalAsset: numberInString;
}
export declare type IsolatedMarginLevelStatus = 'EXCESSIVE' | 'NORMAL' | 'MARGIN_CALL' | 'PRE_LIQUIDATION' | 'FORCE_LIQUIDATION';
export interface IsolatedMarginAccountAssets {
baseAsset: IsolatedMarginAccountAsset;
quoteAsset: IsolatedMarginAccountAsset;
symbol: string;
isolatedCreated: boolean;
enabled: boolean;
marginLevel: numberInString;
marginLevelStatus: IsolatedMarginLevelStatus;
marginRatio: numberInString;
indexPrice: numberInString;
liquidatePrice: numberInString;
liquidateRate: numberInString;
tradeEnabled: boolean;
}
export interface IsolatedMarginAccountInfo {
assets: IsolatedMarginAccountAssets[];
totalAssetOfBtc?: numberInString;
totalLiabilityOfBtc?: numberInString;
totalNetAssetOfBtc?: numberInString;
}
export interface SpotSubUserAssetBtcList {

@@ -991,1 +1024,73 @@ email: string;

}
export interface StakingProductDetail {
asset: string;
rewardAsset: string;
duration: number;
renewable: boolean;
apy: numberInString;
}
export interface StakingProductQuota {
totalPersonalQuota: numberInString;
minimum: numberInString;
}
export interface StakingProduct {
projectId: string;
detail: StakingProductDetail;
quota: StakingProductQuota;
}
export interface StakingProductPosition {
positionId: numberInString;
projectId: string;
asset: string;
amount: numberInString;
purchaseTime: numberInString;
duration: numberInString;
accrualDays: numberInString;
rewardAsset: string;
APY: numberInString;
rewardAmt: numberInString;
extraRewardAsset: string;
extraRewardAPY: numberInString;
estExtraRewardAmt: numberInString;
nextInterestPay: numberInString;
nextInterestPayDate: numberInString;
payInterestPeriod: numberInString;
redeemAmountEarly: numberInString;
interestEndDate: numberInString;
deliverDate: numberInString;
redeemPeriod: numberInString;
redeemingAmt: numberInString;
partialAmtDeliverDate: numberInString;
canRedeemEarly: boolean;
renewable: boolean;
type: string;
status: StakingStatus;
}
export interface StakingBasicParams {
product: StakingProductType;
current?: number;
size?: number;
}
export interface StakingHistory {
positionId: numberInString;
time: number;
asset: string;
project?: string;
amount: numberInString;
lockPeriod?: numberInString;
deliverDate?: numberInString;
type?: string;
status: string;
}
export interface StakingPersonalLeftQuota {
leftPersonalQuota: numberInString;
}
export interface StakingHistoryParams extends StakingBasicParams {
txnType: StakingTxnType;
asset?: string;
startTime?: number;
endTime?: number;
}
export declare type StakingTxnType = 'SUBSCRIPTION' | 'REDEMPTION' | 'INTEREST';
export declare type StakingStatus = 'HOLDING' | 'REDEEMED';
export declare type StakingProductType = 'STAKING' | 'F_DEFI' | 'L_DEFI';

5

package.json
{
"name": "binance",
"version": "2.0.37",
"version": "2.0.38",
"description": "Node.js connector for Binance's REST APIs and WebSockets, with TypeScript & integration tests.",

@@ -31,3 +31,4 @@ "main": "lib/index.js",

"Tony Pettigrew (https://github.com/NeverEnder4)",
"Chris <apexearth@gmail.com> (https://github.com/apexearth)"
"Chris <apexearth@gmail.com> (https://github.com/apexearth)",
"Bruno Lobo <me@brunolobo.xyz> (https://brunolobo.xyz)"
],

@@ -34,0 +35,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc