Skip to content

Commit

Permalink
Merge pull request ccxt#15015 from samgermain/btcalpha-precise
Browse files Browse the repository at this point in the history
btcalpha.createOrder string math
  • Loading branch information
kroitor authored Oct 14, 2022
2 parents 87744cb + ae939e0 commit e2b5288
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/btcalpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,10 @@ module.exports = class btcalpha extends Exchange {
throw new InvalidOrder (this.id + ' ' + this.json (response));
}
const order = this.parseOrder (response, market);
amount = (order['amount'] > 0) ? order['amount'] : amount;
const orderAmount = order['amount'].toString ();
amount = Precise.stringGt (orderAmount, '0') ? order['amount'] : amount;
return this.extend (order, {
'amount': amount,
'amount': this.parseNumber (amount),
});
}

Expand Down

0 comments on commit e2b5288

Please sign in to comment.