Add new validation to validate excludes

This commit is contained in:
Matthias
2022-03-18 19:26:54 +01:00
parent d32153c8d3
commit 97c1316bf1
4 changed files with 23 additions and 4 deletions

View File

@@ -580,9 +580,9 @@ class Exchange:
def validate_pricing(self, pricing: Dict) -> None:
if pricing.get('use_order_book', False) and not self.exchange_has('fetchL2OrderBook'):
raise OperationalException(f'Orderbook not available for {self.name}.')
if (not pricing.get('use_order_book', False) and not (
self.exchange_has('fetchTicker') and self._ft_has['tickers_have_price']
)):
if (not pricing.get('use_order_book', False) and (
not self.exchange_has('fetchTicker')
or not self._ft_has['tickers_have_price'])):
raise OperationalException(f'Ticker pricing not available for {self.name}.')
def validate_order_time_in_force(self, order_time_in_force: Dict) -> None: