Implement fix for okx futures not having quoteVolume

This commit is contained in:
Matthias 2022-03-17 20:15:51 +01:00
parent a13b633c56
commit 1299a703e2
3 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,7 @@ class Exchange:
"ohlcv_partial_candle": True,
# Check https://github.com/ccxt/ccxt/issues/10767 for removal of ohlcv_volume_currency
"ohlcv_volume_currency": "base", # "base" or "quote"
"tickers_has_quoteVolume": True,
"trades_pagination": "time", # Possible are "time" or "id"
"trades_pagination_arg": "since",
"l2_limit_range": None,

View File

@ -23,6 +23,9 @@ class Okx(Exchange):
"mark_ohlcv_timeframe": "4h",
"funding_fee_timeframe": "8h",
}
_ft_has_futures: Dict = {
"tickers_has_quoteVolume": False,
}
_supported_trading_mode_margin_pairs: List[Tuple[TradingMode, MarginMode]] = [
# TradingMode.SPOT always supported and not required in this list

View File

@ -71,7 +71,9 @@ class VolumePairList(IPairList):
f'to at least {self._tf_in_sec} and restart the bot.'
)
if not self._use_range and not self._exchange.exchange_has('fetchTickers'):
if (not self._use_range and not (
self._exchange.exchange_has('fetchTickers')
and self._exchange._ft_has["tickers_has_quoteVolume"])):
raise OperationalException(
"Exchange does not support dynamic whitelist in this configuration. "
"Please edit your config and either remove Volumepairlist, "