wait for markets to be loaded before looping in symbols.

This commit is contained in:
misagh 2018-08-09 11:51:38 +02:00
parent 255f303850
commit cef09f49a6

View File

@ -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)