From b366e8155349316ccad07341a36adc865a335f8d Mon Sep 17 00:00:00 2001 From: Daniel Routovaara Date: Fri, 9 Feb 2018 05:08:43 +0100 Subject: [PATCH] Fixes issue 1786 (#1886) * Only round price to precision, not amount. That can round 0.05XBT to 0 and cause an error. --- exchanges/kraken.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exchanges/kraken.js b/exchanges/kraken.js index 793d65ee5..315a35330 100644 --- a/exchanges/kraken.js +++ b/exchanges/kraken.js @@ -187,8 +187,7 @@ Trader.prototype.roundAmount = function(amount) { }; Trader.prototype.addOrder = function(tradeType, amount, price, callback) { - amount = this.roundAmount(amount); - price = this.roundAmount(price); // but the link talks about rounding price... And I had the bug + price = this.roundAmount(price); // only round price, not amount log.debug('[kraken.js] (addOrder)', tradeType.toUpperCase(), amount, this.asset, '@', price, this.currency);