do not verify ticker_interval and whitelist for list-markets/list-pairs
This commit is contained in:
parent
72fb80904c
commit
cbd488fc7e
@ -135,12 +135,12 @@ class Exchange(object):
|
||||
|
||||
# Check if all pairs are available
|
||||
self.validate_pairs(config['exchange']['pair_whitelist'])
|
||||
|
||||
self.validate_ordertypes(config.get('order_types', {}))
|
||||
self.validate_order_time_in_force(config.get('order_time_in_force', {}))
|
||||
|
||||
if config.get('ticker_interval'):
|
||||
# Check if timeframe is available
|
||||
self.validate_timeframes(config['ticker_interval'])
|
||||
# Check if timeframe is available
|
||||
self.validate_timeframes(config['ticker_interval'])
|
||||
|
||||
def __del__(self):
|
||||
"""
|
||||
@ -295,6 +295,9 @@ class Exchange(object):
|
||||
"""
|
||||
Checks if ticker interval from config is a supported timeframe on the exchange
|
||||
"""
|
||||
if not timeframe:
|
||||
return
|
||||
|
||||
if not hasattr(self._api, "timeframes") or self._api.timeframes is None:
|
||||
# If timeframes attribute is missing (or is None), the exchange probably
|
||||
# has no fetchOHLCV method.
|
||||
|
@ -57,6 +57,12 @@ def start_list_pairs(args: Namespace, pairs_only: bool = False) -> None:
|
||||
# Fetch exchange name from args, use bittrex as default exchange
|
||||
config['exchange']['name'] = args.exchange or 'bittrex'
|
||||
|
||||
# We don't need ticker interval and pairs whitelist
|
||||
# for this subcommand,
|
||||
# avoid validating it by the Exchange object
|
||||
config['exchange']['pairs_whitelist'] = None
|
||||
config['ticker_interval'] = None
|
||||
|
||||
# Init exchange
|
||||
exchange = Exchange(config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user