mock order_book and additional test

This commit is contained in:
Nullart2
2018-08-14 18:12:44 +08:00
parent c9c0e108ab
commit 78610bb47f
3 changed files with 72 additions and 9 deletions

View File

@@ -253,6 +253,7 @@ class FreqtradeBot(object):
logger.info('Getting price from order book')
order_book_top = experimental_bid_strategy.get('order_book_top', 1)
order_book = self.exchange.get_order_book(pair, order_book_top)
logger.debug('order_book %s', order_book)
# top 1 = index 0
order_book_rate = order_book['bids'][order_book_top - 1][0]
# if ticker has lower rate, then use ticker ( usefull if down trending )