wait for markets to be loaded before looping in symbols.
This commit is contained in:
parent
255f303850
commit
cef09f49a6
@ -338,6 +338,7 @@ class Exchange(object):
|
|||||||
# COMMENTED CODE IS FOR DISCUSSION: where should we close the loop on async ?
|
# COMMENTED CODE IS FOR DISCUSSION: where should we close the loop on async ?
|
||||||
# loop = asyncio.new_event_loop()
|
# loop = asyncio.new_event_loop()
|
||||||
# asyncio.set_event_loop(loop)
|
# asyncio.set_event_loop(loop)
|
||||||
|
await self._api_async.load_markets()
|
||||||
input_coroutines = [self.async_get_candle_history(
|
input_coroutines = [self.async_get_candle_history(
|
||||||
symbol, tick_interval) for symbol in pairs]
|
symbol, tick_interval) for symbol in pairs]
|
||||||
tickers = await asyncio.gather(*input_coroutines, return_exceptions=True)
|
tickers = await asyncio.gather(*input_coroutines, return_exceptions=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user