From cef09f49a63676d451571007a202cd52bda42021 Mon Sep 17 00:00:00 2001 From: misagh Date: Thu, 9 Aug 2018 11:51:38 +0200 Subject: [PATCH] wait for markets to be loaded before looping in symbols. --- freqtrade/exchange/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index 46a56860b..50d759936 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -338,6 +338,7 @@ class Exchange(object): # COMMENTED CODE IS FOR DISCUSSION: where should we close the loop on async ? # loop = asyncio.new_event_loop() # asyncio.set_event_loop(loop) + await self._api_async.load_markets() input_coroutines = [self.async_get_candle_history( symbol, tick_interval) for symbol in pairs] tickers = await asyncio.gather(*input_coroutines, return_exceptions=True)