From 48cd468b6ca10438d367644ae970de35bc4ce16b Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 27 Jul 2018 07:40:27 +0100 Subject: [PATCH] Don't do all network calls at once without async --- freqtrade/freqtradebot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index d7c5657c3..46fbb3a38 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -327,13 +327,11 @@ class FreqtradeBot(object): if not whitelist: raise DependencyException('No currency pairs in whitelist') - thistory = {} - for _pair in whitelist: - thistory[_pair] = self.exchange.get_ticker_history(_pair, interval) # Pick pair based on buy signals for _pair in whitelist: - (buy, sell) = self.strategy.get_signal(_pair, interval, thistory[_pair]) + thistory = self.exchange.get_ticker_history(_pair, interval) + (buy, sell) = self.strategy.get_signal(_pair, interval, thistory) if buy and not sell: return self.execute_buy(_pair, stake_amount)