Files
.devcontainer
.github
build_helpers
config_examples
docker
docs
freqtrade
commands
configuration
PeriodicCache.py
__init__.py
check_exchange.py
config_setup.py
config_validation.py
configuration.py
deprecated_settings.py
directory_operations.py
environment_vars.py
load_config.py
timerange.py
data
edge
enums
exchange
mixins
optimize
persistence
plot
plugins
resolvers
rpc
strategy
templates
vendor
__init__.py
__main__.py
constants.py
exceptions.py
freqtradebot.py
loggers.py
main.py
misc.py
wallets.py
worker.py
scripts
tests
user_data
.coveragerc
.dockerignore
.gitattributes
.gitignore
.pylintrc
.readthedocs.yml
CONTRIBUTING.md
Dockerfile
LICENSE
MANIFEST.in
README.md
docker-compose.yml
environment.yml
freqtrade.service
freqtrade.service.watchdog
mkdocs.yml
pyproject.toml
requirements-dev.txt
requirements-hyperopt.txt
requirements-plot.txt
requirements.txt
setup.cfg
setup.py
setup.sh
stable/freqtrade/configuration/config_setup.py

28 lines
705 B
Python

import logging
from typing import Any, Dict
from freqtrade.enums import RunMode
from .config_validation import validate_config_consistency
from .configuration import Configuration
logger = logging.getLogger(__name__)
def setup_utils_configuration(args: Dict[str, Any], method: RunMode) -> Dict[str, Any]:
"""
Prepare the configuration for utils subcommands
:param args: Cli args from Arguments()
:param method: Bot running mode
:return: Configuration
"""
configuration = Configuration(args, method)
config = configuration.get_config()
# Ensure these modes are using Dry-run
config['dry_run'] = True
validate_config_consistency(config)
return config