Skip to content

Commit

Permalink
fix exmo to pass orderbook tests ccxt#1017
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Dec 31, 2017
1 parent 7946716 commit 2cdb9b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/exmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ module.exports = class exmo extends Exchange {
let response = await this.publicGetOrderBook (this.extend ({
'pair': market['id'],
}, params));
let orderbook = response[market['id']];
return this.parseOrderBook (orderbook, undefined, 'bid', 'ask');
let result = response[market['id']];
let orderbook = this.parseOrderBook (result, undefined, 'bid', 'ask');
return this.extend (orderbook, {
'bids': this.sortBy (orderbook['bids'], 0, true),
'asks': this.sortBy (orderbook['asks'], 0),
});
}

parseTicker (ticker, market = undefined) {
Expand Down

0 comments on commit 2cdb9b4

Please sign in to comment.