wording fixed

This commit is contained in:
hroff-1902 2019-06-12 22:37:43 +03:00
parent dc7f883751
commit 0cc2210f22
3 changed files with 16 additions and 16 deletions

View File

@ -13,8 +13,8 @@ from jsonschema import Draft4Validator, validators
from jsonschema.exceptions import ValidationError, best_match
from freqtrade import OperationalException, constants
from freqtrade.exchange import (is_exchange_bad, is_exchange_known,
is_exchange_officially_supported, known_exchanges)
from freqtrade.exchange import (is_exchange_bad, is_exchange_available,
is_exchange_officially_supported, available_exchanges)
from freqtrade.misc import deep_merge_dicts
from freqtrade.state import RunMode
@ -389,27 +389,27 @@ class Configuration(object):
logger.info("Checking exchange...")
exchange = config.get('exchange', {}).get('name').lower()
if not is_exchange_known(exchange):
if not is_exchange_available(exchange):
raise OperationalException(
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'{", ".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):
logger.info(f'Exchange "{exchange}" is officially supported '
f'by the Freqtrade development team.')
else:
logger.warning(f'Exchange "{exchange}" is not officially supported '
f'by the Freqtrade development team. '
f'It may work with serious issues or not work at all. '
logger.warning(f'Exchange "{exchange}" is not officially supported. '
f'It may work flawlessly (please report back) or have serious issues. '
f'Use it at your own discretion.')
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.')
return False

View File

@ -1,8 +1,8 @@
from freqtrade.exchange.exchange import Exchange # noqa: F401
from freqtrade.exchange.exchange import (is_exchange_bad, # noqa: F401
is_exchange_known,
is_exchange_available,
is_exchange_officially_supported,
known_exchanges)
available_exchanges)
from freqtrade.exchange.exchange import (timeframe_to_seconds, # noqa: F401
timeframe_to_minutes,
timeframe_to_msecs)

View File

@ -156,7 +156,7 @@ class Exchange(object):
# Find matching class for the given exchange 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')
ex_config = {
@ -726,15 +726,15 @@ def is_exchange_bad(exchange: str) -> bool:
return exchange in ['bitmex']
def is_exchange_known(exchange: str, ccxt_module=None) -> bool:
return exchange in known_exchanges(ccxt_module)
def is_exchange_available(exchange: str, ccxt_module=None) -> bool:
return exchange in available_exchanges(ccxt_module)
def is_exchange_officially_supported(exchange: str) -> bool:
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