binance-api-node
Advanced tools
Comparing version 0.11.11 to 0.11.12
@@ -666,2 +666,8 @@ "use strict"; | ||
return privCall('/fapi/v1/income', payload); | ||
}, | ||
lendingAccount: function lendingAccount(payload) { | ||
return privCall('/sapi/v1/lending/union/account', payload); | ||
}, | ||
fundingWallet: function fundingWallet(payload) { | ||
return privCall('/sapi/v1/asset/get-funding-asset', payload, 'POST'); | ||
} | ||
@@ -668,0 +674,0 @@ }; |
281
index.d.ts
@@ -13,2 +13,8 @@ // tslint:disable:interface-name | ||
export type ErrorCodes_LT = -1000 | -1001 | -1002 | -1003 | -1006 | -1007 | -1013 | -1014 | ||
| -1015 | -1016 | -1020 | -1021 | -1022 | -1100 | -1101 | -1102 | ||
| -1103 | -1104 | -1105 | -1106 | -1112 | -1114 | -1115 | -1116 | ||
| -1117 | -1118 | -1119 | -1120 | -1121 | -1125 | -1127 | -1128 | ||
| -1130 | -2008 | -2009 | -2010 | -2012 | -2013 | -2014 | -2015 | ||
export const enum ErrorCodes { | ||
@@ -65,3 +71,3 @@ UNKNOWN = -1000, | ||
makerCommission: number | ||
permissions: TradingType[] | ||
permissions: TradingType_LT[] | ||
sellerCommission: number | ||
@@ -94,2 +100,30 @@ takerCommission: number | ||
export type booleanString = 'true' | 'false' | ||
export interface positionAmount { | ||
amount: string | ||
amountInBTC: string | ||
amountInUSDT: string | ||
asset: string | ||
} | ||
export interface LendingAccount { | ||
positionAmountVos: positionAmount[] | ||
totalAmountInBTC: string | ||
totalAmountInUSDT: string | ||
totalFixedAmountInBTC: string | ||
totalFixedAmountInUSDT: string | ||
totalFlexibleInBTC: string | ||
totalFlexibleInUSDT: string | ||
} | ||
export interface FundingWallet { | ||
asset: string | ||
free: string // available balance | ||
locked: string // locked asset | ||
freeze: string // freeze asset | ||
withdrawing: string | ||
btcValuation: string | ||
} | ||
export interface DepositAddress { | ||
@@ -106,2 +140,4 @@ address: string | ||
export type DepositStatus_LT = 0 | 1 | ||
export const enum DepositStatus { | ||
@@ -120,3 +156,3 @@ PENDING = 0, | ||
txId: string | ||
status: DepositStatus | ||
status: DepositStatus_LT | ||
addressTag?: string | ||
@@ -128,2 +164,4 @@ transferType?: number | ||
export type WithdrawStatus_LT = 0 | 1 | 2 | 3 | 4 | 5 | 6 | ||
export const enum WithdrawStatus { | ||
@@ -148,3 +186,3 @@ EMAIL_SENT = 0, | ||
applyTime: number | ||
status: WithdrawStatus | ||
status: WithdrawStatus_LT | ||
network: string | ||
@@ -232,2 +270,9 @@ transferType?: number | ||
export type TransferType_LT = '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 const enum TransferType { | ||
@@ -254,3 +299,3 @@ MAIN_C2C = 'MAIN_C2C', | ||
export interface UniversalTransfer { | ||
type: TransferType | ||
type: TransferType_LT | ||
asset: string | ||
@@ -262,3 +307,3 @@ amount: string | ||
export interface UniversalTransferHistory { | ||
type: TransferType | ||
type: TransferType_LT | ||
startTime?: number | ||
@@ -276,3 +321,3 @@ endTime?: number | ||
amount: string | ||
type: TransferType | ||
type: TransferType_LT | ||
status: string | ||
@@ -302,2 +347,4 @@ tranId: number | ||
export type MarginType_LT = 'ISOLATED' | 'CROSSED' | ||
export const enum MarginType { | ||
@@ -322,2 +369,4 @@ ISOLATED = 'ISOLATED', | ||
exchangeInfo(): Promise<ExchangeInfo> | ||
lendingAccount(options?: { useServerTime: boolean }): Promise<LendingAccount> | ||
fundingWallet(options?: { asset?: string, needBtcValuation?: booleanString, useServerTime?: boolean }): Promise<FundingWallet[]> | ||
order(options: NewOrderSpot): Promise<Order> | ||
@@ -479,3 +528,3 @@ orderTest(options: NewOrderSpot): Promise<Order> | ||
symbol: string | ||
marginType: MarginType | ||
marginType: MarginType_LT | ||
recvWindow?: number | ||
@@ -485,3 +534,3 @@ }): Promise<FuturesMarginTypeResult> | ||
symbol?: string | ||
incomeType?: FuturesIncomeType | ||
incomeType?: FuturesIncomeType_LT | ||
startTime?: number | ||
@@ -640,2 +689,5 @@ endTime?: number | ||
export type CandleChartInterval_LT = '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | ||
| '6h' | '8h' | '12h' | '1d' | '3d' | '1w' | '1M' | ||
export const enum CandleChartInterval { | ||
@@ -659,2 +711,4 @@ ONE_MINUTE = '1m', | ||
export type RateLimitType_LT = 'REQUEST_WEIGHT' | 'ORDERS' | ||
export const enum RateLimitType { | ||
@@ -665,2 +719,4 @@ REQUEST_WEIGHT = 'REQUEST_WEIGHT', | ||
export type TradingType_LT = 'MARGIN' | 'SPOT' | ||
export const enum TradingType { | ||
@@ -671,2 +727,4 @@ MARGIN = 'MARGIN', | ||
export type RateLimitInterval_LT = 'SECOND' | 'MINUTE' | 'DAY' | ||
export const enum RateLimitInterval { | ||
@@ -679,4 +737,4 @@ SECOND = 'SECOND', | ||
export interface ExchangeInfoRateLimit { | ||
rateLimitType: RateLimitType | ||
interval: RateLimitInterval | ||
rateLimitType: RateLimitType_LT | ||
interval: RateLimitInterval_LT | ||
intervalNum: number | ||
@@ -686,2 +744,4 @@ limit: number | ||
export type ExchangeFilterType_LT = 'EXCHANGE_MAX_NUM_ORDERS' | 'EXCHANGE_MAX_ALGO_ORDERS' | ||
export const enum ExchangeFilterType { | ||
@@ -693,6 +753,9 @@ EXCHANGE_MAX_NUM_ORDERS = 'EXCHANGE_MAX_NUM_ORDERS', | ||
export interface ExchangeFilter { | ||
filterType: ExchangeFilterType | ||
filterType: ExchangeFilterType_LT | ||
limit: number | ||
} | ||
export type SymbolFilterType_LT = 'PRICE_FILTER' | 'PERCENT_PRICE' | 'LOT_SIZE' | ||
| 'MIN_NOTIONAL' | 'MAX_NUM_ORDERS' | 'MAX_ALGO_ORDERS' | ||
export const enum SymbolFilterType { | ||
@@ -737,3 +800,3 @@ PRICE_FILTER = 'PRICE_FILTER', | ||
filterType: SymbolFilterType.MAX_NUM_ORDERS | ||
limit: number | ||
maxNumOrders: number | ||
} | ||
@@ -743,3 +806,3 @@ | ||
filterType: SymbolFilterType.MAX_ALGO_ORDERS | ||
limit: number | ||
maxNumAlgoOrders: number | ||
} | ||
@@ -764,6 +827,6 @@ | ||
ocoAllowed: boolean | ||
orderTypes: OrderType[] | ||
permissions: TradingType[] | ||
orderTypes: OrderType_LT[] | ||
permissions: TradingType_LT[] | ||
quoteAsset: string | ||
quoteAssetPrecision: string | ||
quoteAssetPrecision: number | ||
quoteCommissionPrecision: number | ||
@@ -792,9 +855,9 @@ quoteOrderQtyMarketAllowed: boolean | ||
symbol: string | ||
side: OrderSide | ||
positionSide?: PositionSide | ||
type: OrderType | ||
side: OrderSide_LT | ||
positionSide?: PositionSide_LT | ||
type: OrderType_LT | ||
quantity?: string | ||
reduceOnly?: 'true' | 'false' | ||
price?: number | ||
timeInForce?: TimeInForce | ||
timeInForce?: TimeInForce_LT | ||
newClientOrderId?: string | ||
@@ -805,4 +868,4 @@ stopPrice?: number | ||
callbackRate?: number | ||
workingType?: WorkingType | ||
newOrderRespType?: NewOrderRespType | ||
workingType?: WorkingType_LT | ||
newOrderRespType?: NewOrderRespType_LT | ||
recvWindow?: number | ||
@@ -815,3 +878,3 @@ timestamp?: number | ||
listClientOrderId?: string | ||
side: OrderSide | ||
side: OrderSide_LT | ||
quantity: string | ||
@@ -825,4 +888,4 @@ limitClientOrderId?: string | ||
stopIcebergQty?: string | ||
stopLimitTimeInForce?: TimeInForce | ||
newOrderRespType?: NewOrderRespType | ||
stopLimitTimeInForce?: TimeInForce_LT | ||
newOrderRespType?: NewOrderRespType_LT | ||
recvWindow?: number | ||
@@ -834,6 +897,6 @@ useServerTime?: boolean | ||
symbol: string | ||
side: OrderSide | ||
type: OrderType | ||
side: OrderSide_LT | ||
type: OrderType_LT | ||
newClientOrderId?: string | ||
newOrderRespType?: NewOrderRespType | ||
newOrderRespType?: NewOrderRespType_LT | ||
recvWindow?: number | ||
@@ -869,4 +932,4 @@ } | ||
isIsolated?: 'TRUE' | 'FALSE' | boolean | ||
sideEffectType?: SideEffectType | ||
timeInForce?: TimeInForce | ||
sideEffectType?: SideEffectType_LT | ||
timeInForce?: TimeInForce_LT | ||
} | ||
@@ -878,2 +941,4 @@ | ||
export type SideEffectType_LT = 'NO_SIDE_EFFECT' | 'MARGIN_BUY' | 'AUTO_REPAY' | ||
export const enum SideEffectType { | ||
@@ -905,10 +970,10 @@ NO_SIDE_EFFECT = 'NO_SIDE_EFFECT', | ||
price: string | ||
side: OrderSide | ||
status: OrderStatus | ||
side: OrderSide_LT | ||
status: OrderStatus_LT | ||
stopPrice?: string | ||
symbol: string | ||
time: number | ||
timeInForce: TimeInForce | ||
timeInForce: TimeInForce_LT | ||
transactTime?: number | ||
type: OrderType | ||
type: OrderType_LT | ||
updateTime: number | ||
@@ -927,17 +992,19 @@ } | ||
reduceOnly: boolean | ||
side: OrderSide | ||
positionSide: PositionSide | ||
status: OrderStatus | ||
side: OrderSide_LT | ||
positionSide: PositionSide_LT | ||
status: OrderStatus_LT | ||
stopPrice: string | ||
closePosition: boolean | ||
symbol: string | ||
timeInForce: TimeInForce | ||
type: OrderType | ||
origType: OrderType | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
origType: OrderType_LT | ||
activatePrice: string | ||
priceRate: string | ||
updateTime: number | ||
workingType: WorkingType | ||
workingType: WorkingType_LT | ||
} | ||
export type ListOrderStatus_LT = 'EXECUTING' | 'ALL_DONE' | 'REJECT' | ||
export const enum ListOrderStatus { | ||
@@ -949,2 +1016,4 @@ EXECUTING = 'EXECUTING', | ||
export type ListStatusType_LT = 'RESPONSE' | 'EXEC_STARTED' | 'ALL_DONE' | ||
export const enum ListStatusType { | ||
@@ -956,2 +1025,4 @@ RESPONSE = 'RESPONSE', | ||
export type OcoOrderType_LT = 'OCO' | ||
export const enum OcoOrderType { | ||
@@ -964,4 +1035,4 @@ CONTINGENCY_TYPE = 'OCO', | ||
contingencyType: OcoOrderType.CONTINGENCY_TYPE | ||
listStatusType: ListStatusType | ||
listOrderStatus: ListOrderStatus | ||
listStatusType: ListStatusType_LT | ||
listOrderStatus: ListOrderStatus_LT | ||
listClientOrderId: string | ||
@@ -974,2 +1045,4 @@ transactionTime: number | ||
export type OrderSide_LT = 'BUY' | 'SELL' | ||
export const enum OrderSide { | ||
@@ -980,2 +1053,5 @@ BUY = 'BUY', | ||
export type OrderStatus_LT = 'CANCELED' | 'EXPIRED' | 'FILLED' | 'NEW' | 'PARTIALLY_FILLED' | 'PENDING_CANCEL' | ||
| 'REJECTED' | ||
export const enum OrderStatus { | ||
@@ -991,2 +1067,5 @@ CANCELED = 'CANCELED', | ||
export type OrderType_LT = 'LIMIT' | 'LIMIT_MAKER' | 'MARKET' | 'STOP' | 'STOP_MARKET' | 'STOP_LOSS_LIMIT' | ||
| 'TAKE_PROFIT_LIMIT' | 'TAKE_PROFIT_MARKET' | 'TRAILING_STOP_MARKET' | ||
export const enum OrderType { | ||
@@ -1004,2 +1083,4 @@ LIMIT = 'LIMIT', | ||
export type NewOrderRespType_LT = 'ACK' | 'RESULT' | 'FULL' | ||
export const enum NewOrderRespType { | ||
@@ -1011,2 +1092,4 @@ ACK = 'ACK', | ||
export type TimeInForce_LT = 'GTC' | 'IOC' | 'FOK' | ||
export const enum TimeInForce { | ||
@@ -1018,2 +1101,7 @@ GTC = 'GTC', | ||
export type OrderRejectReason_LT = 'ACCOUNT_CANNOT_SETTLE' | 'ACCOUNT_INACTIVE' | 'DUPLICATE_ORDER' | ||
| 'INSUFFICIENT_BALANCE' | 'MARKET_CLOSED' | 'NONE' | ||
| 'ORDER_WOULD_TRIGGER_IMMEDIATELY' | 'PRICE_QTY_EXCEED_HARD_LIMITS' | 'UNKNOWN_ACCOUNT' | ||
| 'UNKNOWN_INSTRUMENT' | 'UNKNOWN_ORDER' | ||
export const enum OrderRejectReason { | ||
@@ -1033,2 +1121,5 @@ ACCOUNT_CANNOT_SETTLE = 'ACCOUNT_CANNOT_SETTLE', | ||
export type ExecutionType_LT = 'NEW' | 'CANCELED' | 'REPLACED' | ||
| 'REJECTED' | 'TRADE' | 'EXPIRED' | ||
export const enum ExecutionType { | ||
@@ -1153,2 +1244,5 @@ NEW = 'NEW', | ||
export type EventType_LT = 'account' | 'balanceUpdate' | 'outboundAccountPosition' | ||
| 'executionReport' | 'ACCOUNT_UPDATE' | ||
export const enum EventType { | ||
@@ -1197,3 +1291,3 @@ ACCOUNT = 'account', | ||
eventType: EventType.EXECUTION_REPORT | ||
executionType: ExecutionType // Current execution type | ||
executionType: ExecutionType_LT // Current execution type | ||
icebergQuantity: string // Iceberg quantity | ||
@@ -1208,5 +1302,5 @@ isBuyerMaker: boolean // Is this trade the maker side? | ||
orderRejectReason: OrderRejectReason // Order reject reason; will be an error code. | ||
orderStatus: OrderStatus // Current order status | ||
orderStatus: OrderStatus_LT // Current order status | ||
orderTime: number // Transaction time | ||
orderType: OrderType // Order type | ||
orderType: OrderType_LT // Order type | ||
originalClientOrderId: string | null // Original client order ID; This is the ID of the order being canceled | ||
@@ -1217,6 +1311,6 @@ price: string // Order price | ||
quoteOrderQuantity: string // Quote Order Qty | ||
side: OrderSide // Side | ||
side: OrderSide_LT // Side | ||
stopPrice: string // Stop price | ||
symbol: string // Symbol | ||
timeInForce: TimeInForce // Time in force | ||
timeInForce: TimeInForce_LT // Time in force | ||
totalQuoteTradeQuantity: string // Cumulative quote asset transacted quantity | ||
@@ -1274,4 +1368,4 @@ totalTradeQuantity: string // Cumulative filled quantity | ||
realizedPnl: string | ||
side: OrderSide | ||
positionSide: PositionSide | ||
side: OrderSide_LT | ||
positionSide: PositionSide_LT | ||
symbol: string | ||
@@ -1308,9 +1402,9 @@ time: number | ||
price: string | ||
side: OrderSide | ||
status: OrderStatus | ||
side: OrderSide_LT | ||
status: OrderStatus_LT | ||
stopPrice: string | ||
symbol: string | ||
time: number | ||
timeInForce: TimeInForce | ||
type: OrderType | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
updateTime: number | ||
@@ -1326,7 +1420,7 @@ } | ||
origQty: string | ||
origType: OrderType | ||
origType: OrderType_LT | ||
price: string | ||
side: OrderSide | ||
positionSide: PositionSide | ||
status: OrderStatus | ||
side: OrderSide_LT | ||
positionSide: PositionSide_LT | ||
status: OrderStatus_LT | ||
stopPrice: string | ||
@@ -1336,8 +1430,8 @@ closePosition: boolean | ||
time: number | ||
timeInForce: TimeInForce | ||
type: OrderType | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
activatePrice: string | ||
priceRate: string | ||
updateTime: number | ||
workingType: WorkingType | ||
workingType: WorkingType_LT | ||
} | ||
@@ -1348,4 +1442,4 @@ | ||
contingencyType: OcoOrderType.CONTINGENCY_TYPE | ||
listStatusType: ListStatusType | ||
listOrderStatus: ListOrderStatus | ||
listStatusType: ListStatusType_LT | ||
listOrderStatus: ListOrderStatus_LT | ||
listClientOrderId: string | ||
@@ -1369,4 +1463,4 @@ transactionTime: number | ||
timeInForce: string | ||
type: OrderType | ||
side: OrderSide | ||
type: OrderType_LT | ||
side: OrderSide_LT | ||
} | ||
@@ -1377,4 +1471,4 @@ | ||
contingencyType: OcoOrderType.CONTINGENCY_TYPE | ||
listStatusType: ListStatusType | ||
listOrderStatus: ListOrderStatus | ||
listStatusType: ListStatusType_LT | ||
listOrderStatus: ListOrderStatus_LT | ||
listClientOrderId: string | ||
@@ -1418,3 +1512,3 @@ transactionTime: number | ||
symbol: string | ||
interval: CandleChartInterval | ||
interval: CandleChartInterval_LT | ||
limit?: number | ||
@@ -1455,4 +1549,4 @@ startTime?: number | ||
timeInForce: string | ||
type: OrderType | ||
side: OrderSide | ||
type: OrderType_LT | ||
side: OrderSide_LT | ||
time: number | ||
@@ -1554,2 +1648,5 @@ } | ||
export type FuturesIncomeType_LT = 'TRANSFER' | 'WELCOME_BONUS' | 'REALIZED_PNL' | ||
| 'FUNDING_FEE' | 'COMMISSION' | 'INSURANCE_CLEAR' | ||
export const enum FuturesIncomeType { | ||
@@ -1566,3 +1663,3 @@ TRANSFER = 'TRANSFER', | ||
symbol: string | ||
incomeType: FuturesIncomeType | ||
incomeType: FuturesIncomeType_LT | ||
income: string | ||
@@ -1612,2 +1709,5 @@ asset: string | ||
export type MarginLevelStatus_LT = 'EXCESSIVE' | 'NORMAL' | 'MARGIN_CALL' | ||
| 'PRE_LIQUIDATION' | 'FORCE_LIQUIDATION' | ||
export const enum MarginLevelStatus { | ||
@@ -1627,3 +1727,3 @@ EXCESSIVE = 'EXCESSIVE', | ||
marginLevel: string | ||
marginLevelStatus: MarginLevelStatus | ||
marginLevelStatus: MarginLevelStatus_LT | ||
marginRatio: string | ||
@@ -1649,2 +1749,4 @@ indexPrice: string | ||
export type WalletType_LT = 'SPOT' | 'ISOLATED_MARGIN' | ||
export const enum WalletType { | ||
@@ -1658,4 +1760,4 @@ SPOT = 'SPOT', | ||
symbol: string | ||
transFrom: WalletType | ||
transTo: WalletType | ||
transFrom: WalletType_LT | ||
transTo: WalletType_LT | ||
amount: number | ||
@@ -1668,4 +1770,4 @@ recvWindow?: number | ||
symbol: string | ||
transFrom?: WalletType | ||
transTo?: WalletType | ||
transFrom?: WalletType_LT | ||
transTo?: WalletType_LT | ||
startTime?: number | ||
@@ -1685,4 +1787,4 @@ endTime?: number | ||
txId: number | ||
transFrom: WalletType | ||
transTo: WalletType | ||
transFrom: WalletType_LT | ||
transTo: WalletType_LT | ||
}[] | ||
@@ -1701,4 +1803,4 @@ total: number | ||
timeInForce: string | ||
type: OrderType | ||
side: OrderSide | ||
type: OrderType_LT | ||
side: OrderSide_LT | ||
time: number | ||
@@ -1714,8 +1816,8 @@ } | ||
origQty: string | ||
origType: OrderType | ||
origType: OrderType_LT | ||
price: string | ||
reduceOnly: boolean | ||
side: OrderSide | ||
positionSide: PositionSide | ||
status: OrderStatus | ||
side: OrderSide_LT | ||
positionSide: PositionSide_LT | ||
status: OrderStatus_LT | ||
stopPrice: string | ||
@@ -1725,11 +1827,13 @@ closePosition: boolean | ||
time: number | ||
timeInForce: TimeInForce | ||
type: OrderType | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
activatePrice: string | ||
priceRate: string | ||
updateTime: number | ||
workingType: WorkingType | ||
workingType: WorkingType_LT | ||
priceProtect: boolean | ||
} | ||
export type PositionSide_LT = 'BOTH' | 'SHORT' | 'LONG' | ||
export const enum PositionSide { | ||
@@ -1741,2 +1845,4 @@ BOTH = 'BOTH', | ||
export type WorkingType_LT = 'MARK_PRICE' | 'CONTRACT_PRICE' | ||
export const enum WorkingType { | ||
@@ -1747,1 +1853,2 @@ MARK_PRICE = 'MARK_PRICE', | ||
} | ||
{ | ||
"name": "binance-api-node", | ||
"version": "0.11.11", | ||
"version": "0.11.12", | ||
"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
205878
3166
3926