binance-api-node
Advanced tools
Comparing version 0.11.43 to 0.11.44
@@ -656,2 +656,5 @@ "use strict"; | ||
}, | ||
futuresCancelBatchOrders: function futuresCancelBatchOrders(payload) { | ||
return privCall('/fapi/v1/batchOrders', payload, 'DELETE'); | ||
}, | ||
futuresOpenOrders: function futuresOpenOrders(payload) { | ||
@@ -658,0 +661,0 @@ return privCall('/fapi/v1/openOrders', payload); |
@@ -252,2 +252,13 @@ "use strict"; | ||
var bookTickerTransform = function bookTickerTransform(m) { | ||
return { | ||
updateId: m.u, | ||
symbol: m.s, | ||
bestBid: m.b, | ||
bestBidQnt: m.B, | ||
bestAsk: m.a, | ||
bestAskQnt: m.A | ||
}; | ||
}; | ||
var miniTickerTransform = function miniTickerTransform(m) { | ||
@@ -318,2 +329,25 @@ return { | ||
var bookTicker = function bookTicker(payload, cb) { | ||
var transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | ||
var variator = arguments.length > 3 ? arguments[3] : undefined; | ||
var cache = (Array.isArray(payload) ? payload : [payload]).map(function (symbol) { | ||
var w = openWebSocket("".concat(endpoints.base, "/").concat(symbol.toLowerCase(), "@bookTicker")); | ||
w.onmessage = function (msg) { | ||
var obj = _jsonBigint.default.parse(msg.data); | ||
cb(transform ? bookTickerTransform(obj) : obj); | ||
}; | ||
return w; | ||
}); | ||
return function (options) { | ||
return cache.forEach(function (w) { | ||
return w.close(1000, 'Close handle was called', _objectSpread({ | ||
keepClosed: true | ||
}, options)); | ||
}); | ||
}; | ||
}; | ||
var ticker = function ticker(payload, cb) { | ||
@@ -1001,2 +1035,3 @@ var transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | ||
aggTrades: aggTrades, | ||
bookTicker: bookTicker, | ||
ticker: ticker, | ||
@@ -1003,0 +1038,0 @@ allTickers: allTickers, |
@@ -610,3 +610,7 @@ // tslint:disable:interface-name | ||
futuresOrder(options: NewFuturesOrder): Promise<FuturesOrder> | ||
futuresBatchOrders(options: { | ||
batchOrders: NewFuturesOrder[] | ||
recvWindow?: number | ||
timestamp?: number | ||
}): Promise<FuturesOrder[]> | ||
getMultiAssetsMargin(): Promise<MultiAssetsMargin> | ||
@@ -623,2 +627,9 @@ setMultiAssetsMargin(options: MultiAssetsMargin): Promise<MultiAssetsMargin> | ||
}): Promise<FuturesCancelAllOpenOrdersResult> | ||
futuresCancelBatchOrders(options: { | ||
symbol: string | ||
orderIdList?: string | ||
origClientOrderIdList?: string | ||
recvWindow?: number | ||
timestamp?: number | ||
}) | ||
futuresGetOrder(options: { | ||
@@ -625,0 +636,0 @@ symbol: string |
{ | ||
"name": "binance-api-node", | ||
"version": "0.11.43", | ||
"version": "0.11.44", | ||
"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
234214
3794
4179