Comparing version 1.0.0 to 1.0.1
@@ -15,3 +15,3 @@ var querystring = require("querystring"); | ||
} | ||
}); | ||
}); | ||
@@ -69,7 +69,4 @@ var Bitstamp = function(key, secret, client_id) { | ||
}); | ||
socket.on('error', function(err) { | ||
callback(err); | ||
}); | ||
}); | ||
req.end(data); | ||
@@ -86,3 +83,3 @@ | ||
if(now !== this.last) | ||
this.nonceIncr = -1; | ||
this.nonceIncr = -1; | ||
@@ -94,4 +91,4 @@ this.last = now; | ||
// @link https://stackoverflow.com/questions/6823592/numbers-in-the-form-of-001 | ||
var padding = | ||
this.nonceIncr < 10 ? '000' : | ||
var padding = | ||
this.nonceIncr < 10 ? '000' : | ||
this.nonceIncr < 100 ? '00' : | ||
@@ -146,5 +143,5 @@ this.nonceIncr < 1000 ? '0' : ''; | ||
// | ||
// | ||
// Public API | ||
// | ||
// | ||
@@ -189,6 +186,6 @@ Bitstamp.prototype.transactions = function(market, options, callback) { | ||
// | ||
// | ||
// Private API | ||
// (you need to have key / secret / client ID set) | ||
// | ||
// | ||
@@ -231,2 +228,8 @@ Bitstamp.prototype.balance = function(market, callback) { | ||
Bitstamp.prototype.buyMarket = function(market, amount, callback) { | ||
this._post(market, 'buy/market', callback, { | ||
amount: amount | ||
}); | ||
} | ||
Bitstamp.prototype.sell = function(market, amount, price, limit_price, callback) { | ||
@@ -240,2 +243,8 @@ this._post(market, 'sell', callback, { | ||
Bitstamp.prototype.sellMarket = function(market, amount, callback) { | ||
this._post(market, 'sell/market', callback, { | ||
amount: amount | ||
}); | ||
} | ||
Bitstamp.prototype.withdrawal_requests = function(callback) { | ||
@@ -242,0 +251,0 @@ this._post(null, 'withdrawal_requests', callback, null, true); |
{ | ||
"name": "bitstamp", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Bitstamp REST API wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
12192
270