Skip to content

Commit

Permalink
Fix rounding error for GHS trading on CEX.io
Browse files Browse the repository at this point in the history
We were rounding the GHS amout to sell up, which caused some trades
to fail because of insufficient funds.
  • Loading branch information
iceydee authored and askmike committed Jan 21, 2014
1 parent 4fe1915 commit 0c33763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exchanges/cexio.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Trader.prototype.sell = function(amount, price, callback) {
// Prevent "You incorrectly entered one of fields."
// because of more than 8 decimals.
amount *= 100000000;
amount = Math.ceil(amount);
amount = Math.floor(amount);
amount /= 100000000;

// test placing orders which will not be filled
Expand Down

0 comments on commit 0c33763

Please sign in to comment.