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.9.19 to 0.9.21

30

dist/http-client.js

@@ -168,3 +168,3 @@ "use strict";

return (data && data.useServerTime ? pubCall('/api/v1/time').then(function (r) {
return (data && data.useServerTime ? pubCall('/api/v3/time').then(function (r) {
return r.serverTime;

@@ -204,3 +204,3 @@ }) : Promise.resolve(getTime())).then(function (timestamp) {

var _candles = function candles(pubCall, payload) {
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v1/klines';
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v3/klines';
return checkParams('candles', payload, ['symbol']) && pubCall(endpoint, _objectSpread({

@@ -244,3 +244,3 @@ interval: '5m'

var _book = function book(pubCall, payload) {
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v1/depth';
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v3/depth';
return checkParams('book', payload, ['symbol']) && pubCall(endpoint, payload).then(function (_ref4) {

@@ -263,3 +263,3 @@ var lastUpdateId = _ref4.lastUpdateId,

var _aggTrades = function aggTrades(pubCall, payload) {
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v1/aggTrades';
var endpoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/api/v3/aggTrades';
return checkParams('aggTrades', payload, ['symbol']) && pubCall(endpoint, payload).then(function (trades) {

@@ -299,3 +299,3 @@ return trades.map(function (trade) {

ping: function ping() {
return pubCall('/api/v1/ping').then(function () {
return pubCall('/api/v3/ping').then(function () {
return true;

@@ -305,3 +305,3 @@ });

time: function time() {
return pubCall('/api/v1/time').then(function (r) {
return pubCall('/api/v3/time').then(function (r) {
return r.serverTime;

@@ -311,3 +311,3 @@ });

exchangeInfo: function exchangeInfo() {
return pubCall('/api/v1/exchangeInfo');
return pubCall('/api/v3/exchangeInfo');
},

@@ -324,12 +324,12 @@ book: function book(payload) {

trades: function trades(payload) {
return checkParams('trades', payload, ['symbol']) && pubCall('/api/v1/trades', payload);
return checkParams('trades', payload, ['symbol']) && pubCall('/api/v3/trades', payload);
},
tradesHistory: function tradesHistory(payload) {
return checkParams('tradesHitory', payload, ['symbol']) && kCall('/api/v1/historicalTrades', payload);
return checkParams('tradesHitory', payload, ['symbol']) && kCall('/api/v3/historicalTrades', payload);
},
dailyStats: function dailyStats(payload) {
return pubCall('/api/v1/ticker/24hr', payload);
return pubCall('/api/v3/ticker/24hr', payload);
},
prices: function prices() {
return pubCall('/api/v1/ticker/allPrices').then(function (r) {
return pubCall('/api/v3/ticker/price').then(function (r) {
return r.reduce(function (out, cur) {

@@ -344,3 +344,3 @@ return out[cur.symbol] = cur.price, out;

allBookTickers: function allBookTickers() {
return pubCall('/api/v1/ticker/allBookTickers').then(function (r) {
return pubCall('/api/v3/ticker/bookTicker').then(function (r) {
return r.reduce(function (out, cur) {

@@ -411,9 +411,9 @@ return out[cur.symbol] = cur, out;

getDataStream: function getDataStream() {
return privCall('/api/v1/userDataStream', null, 'POST', true);
return privCall('/api/v3/userDataStream', null, 'POST', true);
},
keepDataStream: function keepDataStream(payload) {
return privCall('/api/v1/userDataStream', payload, 'PUT', false, true);
return privCall('/api/v3/userDataStream', payload, 'PUT', false, true);
},
closeDataStream: function closeDataStream(payload) {
return privCall('/api/v1/userDataStream', payload, 'DELETE', false, true);
return privCall('/api/v3/userDataStream', payload, 'DELETE', false, true);
},

@@ -420,0 +420,0 @@ marginGetDataStream: function marginGetDataStream() {

@@ -618,2 +618,3 @@ // tslint:disable:interface-name

id: number;
symbol: string;
orderId: number;

@@ -620,0 +621,0 @@ orderListId: number;

{
"name": "binance-api-node",
"version": "0.9.19",
"version": "0.9.21",
"description": "A node API wrapper for Binance",

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

@@ -1,2 +0,2 @@

# binance-api-node [![build](https://img.shields.io/travis/Ashlar/binance-api-node/master.svg?style=flat-square)](https://travis-ci.org/Ashlar/binance-api-node) [![cover](https://img.shields.io/coveralls/Ashlar/binance-api-node.svg?style=flat-square)](https://coveralls.io/github/Ashlar/binance-api-node) [![bnb](https://img.shields.io/badge/binance-winner-yellow.svg?style=flat-square)](https://github.com/binance-exchange/binance-api-node)
# binance-api-node [![build](https://img.shields.io/travis/Ashlar/binance-api-node/master.svg?style=flat-square)](https://travis-ci.org/Ashlar/binance-api-node) [![cover](https://img.shields.io/coveralls/github/Ashlar/binance-api-node/master?style=flat-square)](https://coveralls.io/github/Ashlar/binance-api-node?branch=master) [![bnb](https://img.shields.io/badge/binance-winner-yellow.svg?style=flat-square)](https://github.com/binance-exchange/binance-api-node)

@@ -3,0 +3,0 @@ > A complete API wrapper for the [Binance](https://binance.com) API.

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