Skip to content

Commit

Permalink
Merge branch 'relabsoss-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jan 29, 2018
2 parents 93568e8 + b394684 commit ef9c9aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion js/dsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ module.exports = class dsx extends liqui {
let symbol = undefined;
if (market)
symbol = market['symbol'];
let average = this.safeFloat (ticker, 'avg');
if (typeof average !== 'undefined')
average = 1 / average;
return {
'symbol': symbol,
'timestamp': timestamp,
Expand All @@ -128,7 +131,7 @@ module.exports = class dsx extends liqui {
'last': this.safeFloat (ticker, 'last'),
'change': undefined,
'percentage': undefined,
'average': 1 / this.safeFloat (ticker, 'avg'),
'average': average,
'baseVolume': this.safeFloat (ticker, 'vol'),
'quoteVolume': this.safeFloat (ticker, 'vol_cur'),
'info': ticker,
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/dsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def parse_ticker(self, ticker, market=None):
'last': self.safe_float(ticker, 'last'),
'change': None,
'percentage': None,
'average': 1 / self.safe_float(ticker, 'avg'),
'average': 0 if self.safe_float(ticker, 'avg') == 0 else 1 / self.safe_float(ticker, 'avg'),
'baseVolume': self.safe_float(ticker, 'vol'),
'quoteVolume': self.safe_float(ticker, 'vol_cur'),
'info': ticker,
Expand Down

0 comments on commit ef9c9aa

Please sign in to comment.