binance-api-node
Advanced tools
Comparing version 0.11.28 to 0.11.29
@@ -384,23 +384,20 @@ "use strict"; | ||
var allMiniTicker = function allMiniTicker(payload, cb) { | ||
var transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | ||
var cache = (Array.isArray(payload) ? payload : [payload]).map(function () { | ||
var w = openWebSocket("".concat(endpoints.base, "/!miniTicker@arr")); | ||
var allMiniTickers = function allMiniTickers(cb) { | ||
var transform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
var w = openWebSocket("".concat(endpoints.base, "/!miniTicker@arr")); | ||
w.onmessage = function (msg) { | ||
var arr = _jsonBigint.default.parse(msg.data); | ||
w.onmessage = function (msg) { | ||
var arr = _jsonBigint.default.parse(msg.data); | ||
cb(transform ? arr.map(function (m) { | ||
return miniTickerTransform(m); | ||
}) : arr); | ||
}; | ||
cb(transform ? arr.map(function (m) { | ||
return miniTickerTransform(m); | ||
}) : arr); | ||
}; | ||
return w; | ||
}); | ||
return function (options) { | ||
return cache.forEach(function (w) { | ||
return function (w) { | ||
return w.close(1000, 'Close handle was called', _objectSpread({ | ||
keepClosed: true | ||
}, options)); | ||
}); | ||
}; | ||
}; | ||
@@ -986,3 +983,3 @@ }; | ||
miniTicker: miniTicker, | ||
allMiniTicker: allMiniTicker, | ||
allMiniTickers: allMiniTickers, | ||
customSubStream: customSubStream, | ||
@@ -989,0 +986,0 @@ user: user(opts), |
@@ -662,2 +662,5 @@ // tslint:disable:interface-name | ||
) => ReconnectingWebSocketHandler | ||
allMiniTickers: ( | ||
callback: (ticker: MiniTicker[]) => void, | ||
) => ReconnectingWebSocketHandler | ||
futuresTicker: ( | ||
@@ -664,0 +667,0 @@ pair: string | string[], |
{ | ||
"name": "binance-api-node", | ||
"version": "0.11.28", | ||
"version": "0.11.29", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
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
221077