wording fixed
This commit is contained in:
parent
dc7f883751
commit
0cc2210f22
@ -13,8 +13,8 @@ from jsonschema import Draft4Validator, validators
|
|||||||
from jsonschema.exceptions import ValidationError, best_match
|
from jsonschema.exceptions import ValidationError, best_match
|
||||||
|
|
||||||
from freqtrade import OperationalException, constants
|
from freqtrade import OperationalException, constants
|
||||||
from freqtrade.exchange import (is_exchange_bad, is_exchange_known,
|
from freqtrade.exchange import (is_exchange_bad, is_exchange_available,
|
||||||
is_exchange_officially_supported, known_exchanges)
|
is_exchange_officially_supported, available_exchanges)
|
||||||
from freqtrade.misc import deep_merge_dicts
|
from freqtrade.misc import deep_merge_dicts
|
||||||
from freqtrade.state import RunMode
|
from freqtrade.state import RunMode
|
||||||
|
|
||||||
@ -389,27 +389,27 @@ class Configuration(object):
|
|||||||
logger.info("Checking exchange...")
|
logger.info("Checking exchange...")
|
||||||
|
|
||||||
exchange = config.get('exchange', {}).get('name').lower()
|
exchange = config.get('exchange', {}).get('name').lower()
|
||||||
if not is_exchange_known(exchange):
|
if not is_exchange_available(exchange):
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
f'Exchange "{exchange}" is not supported by ccxt '
|
f'Exchange "{exchange}" is not supported by ccxt '
|
||||||
f'and not known for the bot.\n'
|
f'and therefore not available for the bot.\n'
|
||||||
f'The following exchanges are supported by ccxt: '
|
f'The following exchanges are supported by ccxt: '
|
||||||
f'{", ".join(known_exchanges())}'
|
f'{", ".join(available_exchanges())}'
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info(f'Exchange "{exchange}" is supported by ccxt and known for the bot.')
|
logger.info(f'Exchange "{exchange}" is supported by ccxt '
|
||||||
|
f'and therefore available for the bot.')
|
||||||
|
|
||||||
if is_exchange_officially_supported(exchange):
|
if is_exchange_officially_supported(exchange):
|
||||||
logger.info(f'Exchange "{exchange}" is officially supported '
|
logger.info(f'Exchange "{exchange}" is officially supported '
|
||||||
f'by the Freqtrade development team.')
|
f'by the Freqtrade development team.')
|
||||||
else:
|
else:
|
||||||
logger.warning(f'Exchange "{exchange}" is not officially supported '
|
logger.warning(f'Exchange "{exchange}" is not officially supported. '
|
||||||
f'by the Freqtrade development team. '
|
f'It may work flawlessly (please report back) or have serious issues. '
|
||||||
f'It may work with serious issues or not work at all. '
|
|
||||||
f'Use it at your own discretion.')
|
f'Use it at your own discretion.')
|
||||||
|
|
||||||
if check_for_bad and is_exchange_bad(exchange):
|
if check_for_bad and is_exchange_bad(exchange):
|
||||||
logger.warning(f'Exchange "{exchange}" is known to not work with Freqtrade yet. '
|
logger.warning(f'Exchange "{exchange}" is known to not work with the bot yet. '
|
||||||
f'Use it only for development and testing purposes.')
|
f'Use it only for development and testing purposes.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
from freqtrade.exchange.exchange import Exchange # noqa: F401
|
from freqtrade.exchange.exchange import Exchange # noqa: F401
|
||||||
from freqtrade.exchange.exchange import (is_exchange_bad, # noqa: F401
|
from freqtrade.exchange.exchange import (is_exchange_bad, # noqa: F401
|
||||||
is_exchange_known,
|
is_exchange_available,
|
||||||
is_exchange_officially_supported,
|
is_exchange_officially_supported,
|
||||||
known_exchanges)
|
available_exchanges)
|
||||||
from freqtrade.exchange.exchange import (timeframe_to_seconds, # noqa: F401
|
from freqtrade.exchange.exchange import (timeframe_to_seconds, # noqa: F401
|
||||||
timeframe_to_minutes,
|
timeframe_to_minutes,
|
||||||
timeframe_to_msecs)
|
timeframe_to_msecs)
|
||||||
|
@ -156,7 +156,7 @@ class Exchange(object):
|
|||||||
# Find matching class for the given exchange name
|
# Find matching class for the given exchange name
|
||||||
name = exchange_config['name']
|
name = exchange_config['name']
|
||||||
|
|
||||||
if not is_exchange_known(name, ccxt_module):
|
if not is_exchange_available(name, ccxt_module):
|
||||||
raise OperationalException(f'Exchange {name} is not supported by ccxt')
|
raise OperationalException(f'Exchange {name} is not supported by ccxt')
|
||||||
|
|
||||||
ex_config = {
|
ex_config = {
|
||||||
@ -726,15 +726,15 @@ def is_exchange_bad(exchange: str) -> bool:
|
|||||||
return exchange in ['bitmex']
|
return exchange in ['bitmex']
|
||||||
|
|
||||||
|
|
||||||
def is_exchange_known(exchange: str, ccxt_module=None) -> bool:
|
def is_exchange_available(exchange: str, ccxt_module=None) -> bool:
|
||||||
return exchange in known_exchanges(ccxt_module)
|
return exchange in available_exchanges(ccxt_module)
|
||||||
|
|
||||||
|
|
||||||
def is_exchange_officially_supported(exchange: str) -> bool:
|
def is_exchange_officially_supported(exchange: str) -> bool:
|
||||||
return exchange in ['bittrex', 'binance']
|
return exchange in ['bittrex', 'binance']
|
||||||
|
|
||||||
|
|
||||||
def known_exchanges(ccxt_module=None) -> List[str]:
|
def available_exchanges(ccxt_module=None) -> List[str]:
|
||||||
return ccxt_module.exchanges if ccxt_module is not None else ccxt.exchanges
|
return ccxt_module.exchanges if ccxt_module is not None else ccxt.exchanges
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user