Update download-data to download necessary data for futures

This commit is contained in:
Matthias
2021-12-03 14:43:49 +01:00
parent d30aaaeaaa
commit 69f371bf63
3 changed files with 22 additions and 5 deletions

View File

@@ -1326,7 +1326,6 @@ class Exchange:
:param candle_type: '', mark, index, premiumIndex, or funding_rate
:return: List with candle (OHLCV) data
"""
data: List
pair, _, _, data = asyncio.get_event_loop().run_until_complete(
self._async_get_historic_ohlcv(pair=pair, timeframe=timeframe,
since_ms=since_ms, is_new_pair=is_new_pair,
@@ -1494,7 +1493,7 @@ class Exchange:
pair, timeframe, since_ms, s
)
params = deepcopy(self._ft_has.get('ohlcv_params', {}))
if candle_type:
if candle_type not in (CandleType.SPOT, CandleType.SPOT_):
params.update({'price': candle_type})
data = await self._api_async.fetch_ohlcv(pair, timeframe=timeframe,
since=since_ms,