Implement fix for okx futures not having quoteVolume
This commit is contained in:
parent
a13b633c56
commit
1299a703e2
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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, "
|
||||
|
Loading…
Reference in New Issue
Block a user