binance-api-node
Advanced tools
Comparing version 0.10.49 to 0.11.0
272
index.d.ts
@@ -165,4 +165,4 @@ // tslint:disable:interface-name | ||
export interface SetBNBBurnOptions { | ||
spotBNBBurn: "true" | "false"; | ||
interestBNBBurn: "true" | "false"; | ||
spotBNBBurn: boolean; | ||
interestBNBBurn: boolean; | ||
recvWindow?: number; | ||
@@ -210,20 +210,21 @@ } | ||
export type TransferType = | ||
| 'MAIN_C2C' | ||
| 'MAIN_UMFUTURE' | ||
| 'MAIN_CMFUTURE' | ||
| 'MAIN_MARGIN' | ||
| 'MAIN_MINING' | ||
| 'C2C_MAIN' | ||
| 'C2C_UMFUTURE' | ||
| 'C2C_MINING' | ||
| 'UMFUTURE_MAIN' | ||
| 'UMFUTURE_C2C' | ||
| 'UMFUTURE_MARGIN' | ||
| 'CMFUTURE_MAIN' | ||
| 'MARGIN_MAIN' | ||
| 'MARGIN_UMFUTURE' | ||
| 'MINING_MAIN' | ||
| 'MINING_UMFUTURE' | ||
| 'MINING_C2C' | ||
export enum TransferType { | ||
MAIN_C2C = 'MAIN_C2C', | ||
MAIN_UMFUTURE = 'MAIN_UMFUTURE', | ||
MAIN_CMFUTURE = 'MAIN_CMFUTURE', | ||
MAIN_MARGIN = 'MAIN_MARGIN', | ||
MAIN_MINING = 'MAIN_MINING', | ||
C2C_MAIN = 'C2C_MAIN', | ||
C2C_UMFUTURE = 'C2C_UMFUTURE', | ||
C2C_MINING = 'C2C_MINING', | ||
UMFUTURE_MAIN = 'UMFUTURE_MAIN', | ||
UMFUTURE_C2C = 'UMFUTURE_C2C', | ||
UMFUTURE_MARGIN = 'UMFUTURE_MARGIN', | ||
CMFUTURE_MAIN = 'CMFUTURE_MAIN', | ||
MARGIN_MAIN = 'MARGIN_MAIN', | ||
MARGIN_UMFUTURE = 'MARGIN_UMFUTURE', | ||
MINING_MAIN = 'MINING_MAIN', | ||
MINING_UMFUTURE = 'MINING_UMFUTURE', | ||
MINING_C2C = 'MINING_C2C' | ||
} | ||
@@ -258,2 +259,7 @@ export interface UniversalTransfer { | ||
export enum MarginType { | ||
ISOLATED = "ISOLATED", | ||
CROSSED = "CROSSED" | ||
} | ||
export interface Binance { | ||
@@ -420,3 +426,3 @@ getInfo(): GetInfo | ||
symbol: string | ||
marginType: "ISOLATED" | "CROSSED" | ||
marginType: MarginType | ||
recvWindow?: number | ||
@@ -456,2 +462,3 @@ }): Promise<FuturesMarginTypeResult> | ||
}): Promise<{ tranId: number }> | ||
marginAccountInfo(options?: {recvWindow?: number}): Promise<IsolatedCrossAccount> | ||
marginIsolatedAccount(options?: { | ||
@@ -529,2 +536,6 @@ symbols?: string | ||
) => ReconnectingWebSocketHandler | ||
futuresTicker: ( | ||
pair: string | string[], | ||
callback: (ticker: Ticker) => void, | ||
) => ReconnectingWebSocketHandler | ||
allTickers: (callback: (tickers: Ticker[]) => void) => ReconnectingWebSocketHandler | ||
@@ -592,3 +603,6 @@ futuresAllTickers: (callback: (tickers: Ticker[]) => void) => ReconnectingWebSocketHandler | ||
export type RateLimitType = 'REQUEST_WEIGHT' | 'ORDERS' | ||
export enum RateLimitType { | ||
REQUEST_WEIGHT = 'REQUEST_WEIGHT', | ||
ORDERS = 'ORDERS' | ||
} | ||
@@ -600,3 +614,7 @@ export enum TradingType { | ||
export type RateLimitInterval = 'SECOND' | 'MINUTE' | 'DAY' | ||
export enum RateLimitInterval { | ||
SECOND = 'SECOND', | ||
MINUTE = 'MINUTE', | ||
DAY = 'DAY' | ||
} | ||
@@ -610,3 +628,6 @@ export interface ExchangeInfoRateLimit { | ||
export type ExchangeFilterType = 'EXCHANGE_MAX_NUM_ORDERS' | 'EXCHANGE_MAX_ALGO_ORDERS' | ||
export enum ExchangeFilterType { | ||
EXCHANGE_MAX_NUM_ORDERS = 'EXCHANGE_MAX_NUM_ORDERS', | ||
EXCHANGE_MAX_ALGO_ORDERS = 'EXCHANGE_MAX_ALGO_ORDERS' | ||
} | ||
@@ -618,12 +639,13 @@ export interface ExchangeFilter { | ||
export type SymbolFilterType = | ||
| 'PRICE_FILTER' | ||
| 'PERCENT_PRICE' | ||
| 'LOT_SIZE' | ||
| 'MIN_NOTIONAL' | ||
| 'MAX_NUM_ORDERS' | ||
| 'MAX_ALGO_ORDERS' | ||
export enum SymbolFilterType { | ||
PRICE_FILTER = 'PRICE_FILTER', | ||
PERCENT_PRICE = 'PERCENT_PRICE', | ||
LOT_SIZE = 'LOT_SIZE', | ||
MIN_NOTIONAL = 'MIN_NOTIONAL', | ||
MAX_NUM_ORDERS = 'MAX_NUM_ORDERS', | ||
MAX_ALGO_ORDERS = 'MAX_ALGO_ORDERS' | ||
} | ||
export interface SymbolPriceFilter { | ||
filterType: SymbolFilterType | ||
filterType: SymbolFilterType.PRICE_FILTER | ||
minPrice: string | ||
@@ -635,3 +657,3 @@ maxPrice: string | ||
export interface SymbolPercentPriceFilter { | ||
filterType: SymbolFilterType | ||
filterType: SymbolFilterType.PERCENT_PRICE | ||
multiplierDown: string | ||
@@ -643,3 +665,3 @@ multiplierUp: string | ||
export interface SymbolLotSizeFilter { | ||
filterType: SymbolFilterType | ||
filterType: SymbolFilterType.LOT_SIZE | ||
minQty: string | ||
@@ -651,5 +673,5 @@ maxQty: string | ||
export interface SymbolMinNotionalFilter { | ||
filterType: SymbolFilterType.MIN_NOTIONAL | ||
applyToMarket: boolean | ||
avgPriceMins: number | ||
filterType: SymbolFilterType | ||
minNotional: string | ||
@@ -659,3 +681,3 @@ } | ||
export interface SymbolMaxNumOrdersFilter { | ||
filterType: SymbolFilterType | ||
filterType: SymbolFilterType.MAX_NUM_ORDERS | ||
limit: number | ||
@@ -665,3 +687,3 @@ } | ||
export interface SymbolMaxAlgoOrdersFilter { | ||
filterType: SymbolFilterType | ||
filterType: SymbolFilterType.MAX_ALGO_ORDERS | ||
limit: number | ||
@@ -751,3 +773,7 @@ } | ||
export type SideEffectType = 'NO_SIDE_EFFECT' | 'MARGIN_BUY' | 'AUTO_REPAY' | ||
export enum SideEffectType { | ||
NO_SIDE_EFFECT = 'NO_SIDE_EFFECT', | ||
MARGIN_BUY = 'MARGIN_BUY', | ||
AUTO_REPAY = 'AUTO_REPAY' | ||
} | ||
@@ -781,5 +807,21 @@ export interface OrderFill { | ||
export enum ListOrderStatus { | ||
EXECUTING ='EXECUTING', | ||
ALL_DONE = 'ALL_DONE', | ||
REJECT = 'REJECT' | ||
} | ||
export enum ListStatusType { | ||
RESPONSE = 'RESPONSE', | ||
EXEC_STARTED = 'EXEC_STARTED', | ||
ALL_DONE = 'ALL_DONE' | ||
} | ||
export enum OcoOrderType { | ||
CONTINGENCY_TYPE = 'OCO', | ||
} | ||
export interface OcoOrder { | ||
orderListId: number | ||
contingencyType: ContingencyType | ||
contingencyType: OcoOrderType.CONTINGENCY_TYPE | ||
listStatusType: ListStatusType | ||
@@ -794,34 +836,40 @@ listOrderStatus: ListOrderStatus | ||
export type OrderSide = 'BUY' | 'SELL' | ||
export type OrderStatus = | ||
| 'CANCELED' | ||
| 'EXPIRED' | ||
| 'FILLED' | ||
| 'NEW' | ||
| 'PARTIALLY_FILLED' | ||
| 'PENDING_CANCEL' | ||
| 'REJECTED' | ||
export enum OrderSide { | ||
BUY = 'BUY', | ||
SELL = 'SELL' | ||
} | ||
export type OrderType = | ||
| 'LIMIT' | ||
| 'LIMIT_MAKER' | ||
| 'MARKET' | ||
| 'STOP' | ||
| 'STOP_LOSS_LIMIT' | ||
| 'STOP_MARKET' | ||
| 'TAKE_PROFIT_MARKET' | ||
| 'TAKE_PROFIT_LIMIT' | ||
| 'TRAILING_STOP_MARKET' | ||
export enum OrderStatus { | ||
CANCELED = 'CANCELED', | ||
EXPIRED = 'EXPIRED', | ||
FILLED = 'FILLED', | ||
NEW = 'NEW', | ||
PARTIALLY_FILLED = 'PARTIALLY_FILLED', | ||
PENDING_CANCEL = 'PENDING_CANCEL', | ||
REJECTED = 'REJECTED' | ||
} | ||
export type ListOrderStatus = 'EXECUTING' | 'ALL_DONE' | 'REJECT' | ||
export enum OrderType { | ||
LIMIT = 'LIMIT', | ||
LIMIT_MAKER = 'LIMIT_MAKER', | ||
MARKET = 'MARKET', | ||
STOP = 'STOP', | ||
STOP_MARKET ='STOP_MARKET', | ||
TAKE_PROFIT_MARKET = 'TAKE_PROFIT_MARKET', | ||
TRAILING_STOP_MARKET = 'TRAILING_STOP_MARKET' | ||
} | ||
export type ListStatusType = 'RESPONSE' | 'EXEC_STARTED' | 'ALL_DONE' | ||
export enum NewOrderRespType { | ||
ACK = 'ACK', | ||
RESULT = 'RESULT', | ||
FULL = 'FULL' | ||
} | ||
export type ContingencyType = 'OCO' | ||
export enum TimeInForce { | ||
GTC = 'GTC', | ||
IOC = 'IOC', | ||
FOK = 'FOK' | ||
} | ||
export type NewOrderRespType = 'ACK' | 'RESULT' | 'FULL' | ||
export type TimeInForce = 'GTC' | 'IOC' | 'FOK' | ||
export enum OrderRejectReason { | ||
@@ -841,3 +889,10 @@ ACCOUNT_CANNOT_SETTLE = 'ACCOUNT_CANNOT_SETTLE', | ||
export type ExecutionType = 'NEW' | 'CANCELED' | 'REPLACED' | 'REJECTED' | 'TRADE' | 'EXPIRED' | ||
export enum ExecutionType { | ||
NEW = 'NEW', | ||
CANCELED ='CANCELED', | ||
REPLACED = 'REPLACED', | ||
REJECTED = 'REJECTED', | ||
TRADE = 'TRADE', | ||
EXPIRED = 'EXPIRED' | ||
} | ||
@@ -942,2 +997,10 @@ export interface Depth { | ||
export enum EventType { | ||
ACCOUNT = 'account', | ||
BALANCE_UPDATE = 'balanceUpdate', | ||
OUTBOUND_ACCOUNT_POSITION = 'outboundAccountPosition', | ||
EXECUTION_REPORT = 'executionReport', | ||
ACCOUNT_UPDATE = 'ACCOUNT_UPDATE' | ||
} | ||
export interface OutboundAccountInfo { | ||
@@ -953,3 +1016,3 @@ balances: Balances | ||
lastAccountUpdate: number | ||
eventType: 'account' | ||
eventType: EventType.ACCOUNT | ||
eventTime: number | ||
@@ -963,3 +1026,3 @@ } | ||
eventTime: number | ||
eventType: 'balanceUpdate' | ||
eventType: EventType.BALANCE_UPDATE | ||
} | ||
@@ -970,3 +1033,3 @@ | ||
eventTime: number | ||
eventType: 'outboundAccountPosition' | ||
eventType: EventType.OUTBOUND_ACCOUNT_POSITION | ||
lastAccountUpdate: number | ||
@@ -980,3 +1043,3 @@ } | ||
eventTime: number | ||
eventType: 'executionReport' | ||
eventType: EventType.EXECUTION_REPORT | ||
executionType: ExecutionType // Current execution type | ||
@@ -1028,3 +1091,3 @@ icebergQuantity: string // Iceberg quantity | ||
eventTime: string | ||
eventType: 'ACCOUNT_UPDATE' | ||
eventType: EventType.ACCOUNT_UPDATE | ||
transactionTime: number | ||
@@ -1286,9 +1349,10 @@ eventReasonType: string | ||
export type FuturesIncomeType = | ||
| 'TRANSFER' | ||
| 'WELCOME_BONUS' | ||
| 'REALIZED_PNL' | ||
| 'FUNDING_FEE' | ||
| 'COMMISSION' | ||
| 'INSURANCE_CLEAR' | ||
export enum FuturesIncomeType { | ||
TRANSFER = 'TRANSFER', | ||
WELCOME_BONUS = 'WELCOME_BONUS', | ||
REALIZED_PNL = 'REALIZED_PNL', | ||
FUNDING_FEE = 'FUNDING_FEE', | ||
COMMISSION = 'COMMISSION', | ||
INSURANCE_CLEAR = 'INSURANCE_CLEAR' | ||
} | ||
@@ -1315,2 +1379,22 @@ export interface FuturesIncomeResult { | ||
export interface IsolatedCrossAccount { | ||
borrowEnabled: boolean, | ||
marginLevel: string, | ||
totalAssetOfBtc: string, | ||
totalLiabilityOfBtc: string, | ||
totalNetAssetOfBtc: string, | ||
tradeEnabled: boolean, | ||
transferEnabled: boolean, | ||
userAssets: CrossAsset[], | ||
} | ||
export interface CrossAsset { | ||
asset: string, | ||
borrowed: string, | ||
free: string, | ||
interest: string, | ||
locked: string, | ||
netAsset: string, | ||
} | ||
export interface IsolatedMarginAccount { | ||
@@ -1323,2 +1407,10 @@ assets: IsolatedAsset[] | ||
export enum MarginLevelStatus { | ||
EXCESSIVE = 'EXCESSIVE', | ||
NORMAL = 'NORMAL', | ||
MARGIN_CALL = 'MARGIN_CALL', | ||
PRE_LIQUIDATION = 'PRE_LIQUIDATION', | ||
FORCE_LIQUIDATION = 'FORCE_LIQUIDATION' | ||
} | ||
export interface IsolatedAsset { | ||
@@ -1330,8 +1422,3 @@ baseAsset: IsolatedAssetSingle | ||
marginLevel: string | ||
marginLevelStatus: | ||
| 'EXCESSIVE' | ||
| 'NORMAL' | ||
| 'MARGIN_CALL' | ||
| 'PRE_LIQUIDATION' | ||
| 'FORCE_LIQUIDATION' | ||
marginLevelStatus: MarginLevelStatus | ||
marginRatio: string | ||
@@ -1357,7 +1444,12 @@ indexPrice: string | ||
export enum WalletType { | ||
SPOT = 'SPOT', | ||
ISOLATED_MARGIN ='ISOLATED_MARGIN' | ||
} | ||
export interface marginIsolatedTransfer { | ||
asset: string | ||
symbol: string | ||
transFrom: 'SPOT' | 'ISOLATED_MARGIN' | ||
transTo: 'SPOT' | 'ISOLATED_MARGIN' | ||
transFrom: WalletType | ||
transTo: WalletType | ||
amount: number | ||
@@ -1370,4 +1462,4 @@ recvWindow?: number | ||
symbol: string | ||
transFrom?: 'SPOT' | 'ISOLATED_MARGIN' | ||
transTo?: 'SPOT' | 'ISOLATED_MARGIN' | ||
transFrom?: WalletType | ||
transTo?: WalletType | ||
startTime?: number | ||
@@ -1387,4 +1479,4 @@ endTime?: number | ||
txId: number | ||
transFrom: 'SPOT' | 'ISOLATED_MARGIN' | ||
transTo: 'SPOT' | 'ISOLATED_MARGIN' | ||
transFrom: WalletType | ||
transTo: WalletType | ||
}[] | ||
@@ -1391,0 +1483,0 @@ total: number |
{ | ||
"name": "binance-api-node", | ||
"version": "0.10.49", | ||
"version": "0.11.0", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188539
2834
3648