Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

binance-api-node

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binance-api-node - npm Package Compare versions

Comparing version 0.10.34 to 0.10.35

60

dist/websocket.js

@@ -236,2 +236,16 @@ "use strict";

var miniTickerTransform = function miniTickerTransform(m) {
return {
eventType: m.e,
eventTime: m.E,
symbol: m.s,
curDayClose: m.c,
open: m.o,
high: m.h,
low: m.l,
volume: m.v,
volumeQuote: m.q
};
};
var tickerTransform = function tickerTransform(m) {

@@ -331,2 +345,46 @@ return {

var miniTicker = function miniTicker(payload, cb) {
var transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
var cache = (Array.isArray(payload) ? payload : [payload]).map(function (symbol) {
var w = (0, _openWebsocket.default)("".concat(endpoints.base, "/").concat(symbol.toLowerCase(), "@miniTicker"));
w.onmessage = function (msg) {
var obj = JSON.parse(msg.data);
cb(transform ? miniTickerTransform(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 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 (symbol) {
var w = (0, _openWebsocket.default)("".concat(endpoints.base, "/!miniTicker@arr"));
w.onmessage = function (msg) {
var arr = JSON.parse(msg.data);
cb(transform ? arr.map(function (m) {
return miniTickerTransform(m);
}) : arr);
};
return w;
});
return function (options) {
return cache.forEach(function (w) {
return w.close(1000, 'Close handle was called', _objectSpread({
keepClosed: true
}, options));
});
};
};
var aggTradesTransform = function aggTradesTransform(m) {

@@ -788,2 +846,4 @@ return {

allTickers: allTickers,
miniTicker: miniTicker,
allMiniTicker: allMiniTicker,
user: user(opts),

@@ -790,0 +850,0 @@ marginUser: user(opts, 'margin'),

2

package.json
{
"name": "binance-api-node",
"version": "0.10.34",
"version": "0.10.35",
"description": "A node API wrapper for Binance",

@@ -5,0 +5,0 @@ "main": "dist",

Sorry, the diff of this file is too big to display

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