From 460e0711c60299466107f5cbd8d8ba7da1bae4c4 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 4 Mar 2019 11:05:12 +0300 Subject: [PATCH] How to use multiple configuration files Description of multiple config command line options added. Concrete examples to the bot-configuration page (something like "Hiding your key and exchange secret") will follow. Please review grammar, wording etc. --- docs/bot-usage.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/bot-usage.md b/docs/bot-usage.md index 96b16b6b6..51a810668 100644 --- a/docs/bot-usage.md +++ b/docs/bot-usage.md @@ -41,15 +41,45 @@ optional arguments: None) ``` -### How to use a different config file? +### How to use a different configuration file? -The bot allows you to select which config file you want to use. Per +The bot allows you to select which configuration file you want to use. Per default, the bot will load the file `./config.json` ```bash python3 ./freqtrade/main.py -c path/far/far/away/config.json ``` +### How to use multiple configuration files? + +The bot allows you to use multiple configuration files by specifying multiple +`-c/--config` configuration options in the command line. Configuration parameters +defined in the last configuration file override parameters with the same name +defined in the previous configuration file specified in the command line. + +For example, you can make a separate configuration file with your key and secrete +for the Exchange you use for trading, specify default configuration file with +empty key and secrete values while running in the Dry Mode (which does not actually +require them): + +```bash +python3 ./freqtrade/main.py -c ./config.json +``` + +and specify both configuration files when running in the normal Live Trade Mode: + +```bash +python3 ./freqtrade/main.py -c ./config.json -c path/to/secrets/keys.config.json +``` + +This could help you hide your private Exchange key and Exchange secrete on you local machine +by setting appropriate file permissions for the file which contains actual secrets and, additionally, +prevent unintended disclosure of sensitive private data when you publish examples +of your configuration in the project issues or in the Internet. + +See more details on this technique with examples in the documentation page on +[configuration](https://github.com/freqtrade/freqtrade/blob/develop/docs/bot-configuration.md). + ### How to use **--strategy**? This parameter will allow you to load your custom strategy class.