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

bitfinex

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitfinex - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

54

lib/bitfinex.js

@@ -101,3 +101,3 @@ // Generated by CoffeeScript 1.8.0

Bitfinex.prototype.ticker = function(symbol, cb) {
return this.make_public_request('ticker/' + symbol, cb);
return this.make_public_request('pubticker/' + symbol, cb);
};

@@ -117,6 +117,32 @@

Bitfinex.prototype.orderbook = function(symbol, cb) {
var maxOrders, uri;
maxOrders = 50;
uri = 'book/' + symbol + '/?limit_bids=' + maxOrders + '&limit_asks=' + maxOrders;
Bitfinex.prototype.orderbook = function(symbol, options, cb) {
var err, group, limit_asks, limit_bids, uri;
try {
if (typeof options === 'function') {
limit_bids = 50;
limit_asks = 50;
group = 1;
cb = options;
} else {
if (options['limit_bids'] != null) {
limit_bids = options['limit_bids'];
} else {
limit_bids = 50;
}
if (options['limit_asks'] != null) {
limit_asks = options['limit_asks'];
} else {
limit_asks = 50;
}
if (options['group'] != null) {
group = options['group'];
} else {
group = 1;
}
}
} catch (_error) {
err = _error;
return cb(err);
}
uri = 'book/' + symbol + '/?limit_bids=' + limit_bids + '&limit_asks=' + limit_asks + '&group=' + group;
return this.make_public_request(uri, cb);

@@ -283,2 +309,20 @@ };

Bitfinex.prototype.taken_swaps = function(cb) {
return this.make_request('taken_swaps', {}, cb);
};
Bitfinex.prototype.close_swap = function(swap_id, cb) {
return this.make_request('swap/close', {
swap_id: swap_id
}, cb);
};
Bitfinex.prototype.account_infos = function(cb) {
return this.make_request('account_infos', {}, cb);
};
Bitfinex.prototype.margin_infos = function(cb) {
return this.make_request('margin_infos', {}, cb);
};
return Bitfinex;

@@ -285,0 +329,0 @@

2

package.json
{
"name": "bitfinex",
"version": "0.3.3",
"version": "0.3.4",
"gypfile": true,

@@ -5,0 +5,0 @@ "scripts": {

@@ -35,3 +35,3 @@ This is a node.js wrapper for the Bitfinex [API](https://bitfinex.com/pages/api).

`orderbook(symbol, cb)`
`orderbook(symbol, options, cb) `

@@ -80,1 +80,11 @@ `trades(symbol, cb)`

`wallet_balances(cb)`
`taken_swaps(cb)`
`close_swap(cb)`
`account_infos(cb)`
`margin_infos(cb)`
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