Skip to content

Commit

Permalink
safe parsing in braziliex fetchTicker
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Feb 27, 2018
1 parent e8002da commit 620ba08
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/braziliex.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,20 @@ module.exports = class braziliex extends Exchange {
'symbol': symbol,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'high': parseFloat (ticker['highestBid24']),
'low': parseFloat (ticker['lowestAsk24']),
'bid': parseFloat (ticker['highestBid']),
'ask': parseFloat (ticker['lowestAsk']),
'high': this.safeFloat (ticker, 'highestBid24'),
'low': this.safeFloat (ticker, 'lowestAsk24'),
'bid': this.safeFloat (ticker, 'highestBid'),
'ask': this.safeFloat (ticker, 'lowestAsk'),
'vwap': undefined,
'open': undefined,
'close': undefined,
'first': undefined,
'last': parseFloat (ticker['last']),
'change': parseFloat (ticker['percentChange']),
'last': this.safeFloat (ticker, 'last'),
'change': this.safeFloat (ticker, 'percentChange'),
'percentage': undefined,
'average': undefined,
'baseVolume': parseFloat (ticker['baseVolume24']),
'quoteVolume': parseFloat (ticker['quoteVolume24']),
'baseVolume': this.safeFloat (ticker, 'baseVolume24'),
'quoteVolume': this.safeFloat (ticker, 'quoteVolume24'),
'info': ticker,
};
}
Expand Down

0 comments on commit 620ba08

Please sign in to comment.