Skip to content

Commit

Permalink
edited bittrex calculation for change ccxt#1456
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jan 27, 2018
1 parent 5b1ca28 commit 40a7fcf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/bittrex.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,9 @@ module.exports = class bittrex extends Exchange {
let symbol = undefined;
if (market)
symbol = market['symbol'];
let prevday = this.safeFloat (ticker, 'PrevDay');
let previous = this.safeFloat (ticker, 'PrevDay');
let last = this.safeFloat (ticker, 'Last');
let percentchangecalc = (last - prevday) / prevday * 100;
let change = this.truncate (percentchangecalc, 2);
let change = (last - previous) / previous;
return {
'symbol': symbol,
'timestamp': timestamp,
Expand Down

0 comments on commit 40a7fcf

Please sign in to comment.