Comparing version 0.3.3 to 0.3.4
@@ -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 @@ |
{ | ||
"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)` | ||
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
11583
289
89
13