Skip to content

Commit

Permalink
poloniex createOrder amount precision 8 fix ccxt#6278
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Dec 18, 2019
1 parent c397ebf commit 36a76f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/poloniex.js
Original file line number Diff line number Diff line change
Expand Up @@ -979,10 +979,11 @@ module.exports = class poloniex extends Exchange {
await this.loadMarkets ();
const method = 'privatePost' + this.capitalize (side);
const market = this.market (symbol);
amount = this.amountToPrecision (symbol, amount);
const request = {
'currencyPair': market['id'],
'rate': this.priceToPrecision (symbol, price),
'amount': this.amountToPrecision (symbol, amount),
'amount': amount,
};
// remember the timestamp before issuing the request
const timestamp = this.milliseconds ();
Expand Down Expand Up @@ -1011,7 +1012,7 @@ module.exports = class poloniex extends Exchange {
'type': type,
'side': side,
'price': price,
'amount': amount,
'amount': parseFloat (amount),
}, response), market);
const id = order['id'];
this.orders[id] = order;
Expand Down

0 comments on commit 36a76f7

Please sign in to comment.