remove comment, add docstring
This commit is contained in:
parent
3aa210cf93
commit
ca6594cd24
@ -13,7 +13,6 @@ import ccxt
|
|||||||
import ccxt.async_support as ccxt_async
|
import ccxt.async_support as ccxt_async
|
||||||
import arrow
|
import arrow
|
||||||
|
|
||||||
|
|
||||||
from freqtrade import constants, OperationalException, DependencyException, TemporaryError
|
from freqtrade import constants, OperationalException, DependencyException, TemporaryError
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -393,14 +392,10 @@ class Exchange(object):
|
|||||||
|
|
||||||
async def async_get_candles_history(self, pairs: List[str],
|
async def async_get_candles_history(self, pairs: List[str],
|
||||||
tick_interval: str) -> List[Tuple[str, List]]:
|
tick_interval: str) -> List[Tuple[str, List]]:
|
||||||
# COMMENTED CODE IS FOR DISCUSSION: where should we close the loop on async ?
|
"""Download ohlcv history for pair-list asyncronously """
|
||||||
# loop = asyncio.new_event_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)
|
||||||
# await self._api_async.close()
|
|
||||||
return tickers
|
return tickers
|
||||||
|
|
||||||
async def _async_get_candle_history(self, pair: str, tick_interval: str,
|
async def _async_get_candle_history(self, pair: str, tick_interval: str,
|
||||||
|
Loading…
Reference in New Issue
Block a user