fixing support for HitBTC #4778

hitbtc by default send candle from beginning (not most recently)
this change fixed
This commit is contained in:
saeedrss 2021-04-23 21:27:13 +04:30
parent 4005708f85
commit b69a9134f5

View File

@ -874,7 +874,14 @@ class Exchange:
"Fetching pair %s, interval %s, since %s %s...",
pair, timeframe, since_ms, s
)
#fixing support for HitBTC #4778
if self.name== 'HitBTC':
data = await self._api_async.fetch_ohlcv(pair, timeframe=timeframe,
since=since_ms,
limit=self.ohlcv_candle_limit(timeframe),
params={"sort": "DESC"}
)
else:
data = await self._api_async.fetch_ohlcv(pair, timeframe=timeframe,
since=since_ms,
limit=self.ohlcv_candle_limit(timeframe))