Update list-exchanges with watchOHLCV

This commit is contained in:
Matthias 2022-10-10 20:30:38 +02:00
parent a02ef7dce1
commit feeccfedaa
2 changed files with 6 additions and 1 deletions

View File

@ -92,6 +92,8 @@ EXCHANGE_HAS_OPTIONAL = [
# 'fetchMarketLeverageTiers', # Futures initialization
# 'fetchOpenOrder', 'fetchClosedOrder', # replacement for fetchOrder
# 'fetchOpenOrders', 'fetchClosedOrders', # 'fetchOrders', # Refinding balance...
# ccxt.pro
'watchOHLCV'
]

View File

@ -58,7 +58,10 @@ def validate_exchange(exchange: str) -> Tuple[bool, str]:
returns: can_use, reason
with Reason including both missing and missing_opt
"""
ex_mod = getattr(ccxt, exchange.lower())()
try:
ex_mod = getattr(ccxt.pro, exchange.lower())()
except AttributeError:
ex_mod = getattr(ccxt.async_support, exchange.lower())()
result = True
reason = ""
if not ex_mod or not ex_mod.has: