From 757a46ab12761e7519cb172b495cc3aa2c62e754 Mon Sep 17 00:00:00 2001 From: Samuel Husso Date: Mon, 22 Jan 2018 10:39:26 +0200 Subject: [PATCH] ticker_interval as int (instead of string) --- config.json.example | 2 +- docs/configuration.md | 2 +- freqtrade/main.py | 2 +- freqtrade/misc.py | 2 +- freqtrade/tests/conftest.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.json.example b/config.json.example index 0f4271001..37980447d 100644 --- a/config.json.example +++ b/config.json.example @@ -4,7 +4,7 @@ "stake_amount": 0.05, "fiat_display_currency": "USD", "dry_run": false, - "ticker_interval": "5", + "ticker_interval": 5, "minimal_roi": { "40": 0.0, "30": 0.01, diff --git a/docs/configuration.md b/docs/configuration.md index 7a41644ee..5d1204efd 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -17,7 +17,7 @@ The table below will list all configuration parameters. | `max_open_trades` | 3 | Yes | Number of trades open your bot will have. | `stake_currency` | BTC | Yes | Crypto-currency used for trading. | `stake_amount` | 0.05 | Yes | Amount of crypto-currency your bot will use for each trade. Per default, the bot will use (0.05 BTC x 3) = 0.15 BTC in total will be always engaged. -| `ticker_interval` | ["1", "5", "30, "60", "1440"] | No | The ticker interval to use (1min, 5 min, 30 min, 1 hour or 1 day). Defaut is 5 minutes +| `ticker_interval` | [1, 5, 30, 60, 1440] | No | The ticker interval to use (1min, 5 min, 30 min, 1 hour or 1 day). Defaut is 5 minutes | `fiat_display_currency` | USD | Yes | Fiat currency used to show your profits. More information below. | `dry_run` | true | Yes | Define if the bot must be in Dry-run or production mode. | `minimal_roi` | See below | Yes | Set the threshold in percent the bot will use to sell a trade. More information below. diff --git a/freqtrade/main.py b/freqtrade/main.py index 27f3dfd9a..095f7671a 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -476,7 +476,7 @@ def main(sysargv=sys.argv[1:]) -> None: _process, min_secs=_CONF['internals'].get('process_throttle_secs', 10), nb_assets=args.dynamic_whitelist, - interval=int(_CONF.get('ticker_interval', "5")) + interval=int(_CONF.get('ticker_interval', 5)) ) old_state = new_state except KeyboardInterrupt: diff --git a/freqtrade/misc.py b/freqtrade/misc.py index a91062e4e..cab861044 100644 --- a/freqtrade/misc.py +++ b/freqtrade/misc.py @@ -284,7 +284,7 @@ CONF_SCHEMA = { 'type': 'object', 'properties': { 'max_open_trades': {'type': 'integer', 'minimum': 1}, - 'ticker_interval': {'type': 'string', 'enum': ['1', '5', '30', '60', '1440']}, + 'ticker_interval': {'type': 'integer', 'enum': [1, 5, 30, 60, 1440]}, 'stake_currency': {'type': 'string', 'enum': ['BTC', 'ETH', 'USDT']}, 'stake_amount': {'type': 'number', 'minimum': 0.0005}, 'fiat_display_currency': {'type': 'string', 'enum': ['AUD', 'BRL', 'CAD', 'CHF', diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index 7709eae30..70249fd7d 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -18,7 +18,7 @@ def default_conf(): "stake_currency": "BTC", "stake_amount": 0.001, "fiat_display_currency": "USD", - "ticker_interval": "5", + "ticker_interval": 5, "dry_run": True, "minimal_roi": { "40": 0.0,