diff --git a/config_full.json.example b/config_full.json.example index 5ceeaff09..b9631f63d 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -54,11 +54,9 @@ {"method": "StaticPairList"}, { "method": "VolumePairList", - "config": { - "number_assets": 20, - "sort_key": "quoteVolume", - "ttl": 1800 - } + "number_assets": 20, + "sort_key": "quoteVolume", + "refresh_period": 1800 }, {"method": "PrecisionFilter"}, {"method": "PriceFilter", "low_price_ratio": 0.01 diff --git a/docs/configuration.md b/docs/configuration.md index ed50b521e..946ee3bf7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -411,14 +411,14 @@ It uses configuration from `exchange.pair_whitelist` and `exchange.pair_blacklis `VolumePairList` considers outputs of previous pairlists unless it's the first configured pairlist, it does not consider `pair_whitelist`, but selects the top assets from all available markets (with matching stake-currency) on the exchange. -`ttl` allows setting the period (in seconds), at which the pairlist will be refreshed. Defaults to 1800s (30 minutes). +`refresh_period` allows setting the period (in seconds), at which the pairlist will be refreshed. Defaults to 1800s (30 minutes). ```json "pairlists": [{ "method": "VolumePairList", "number_assets": 20, "sort_key": "quoteVolume", - "ttl": 1800, + "refresh_period": 1800, ], ``` diff --git a/docs/developer.md b/docs/developer.md index 0eba6fd59..2d39893bc 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -115,7 +115,7 @@ Now, let's step through the methods which require actions: #### Pairlist configuration Configuration for PairListProvider is done in the bot configuration file in the element `"pairlist"`. -This Pairlist-object may contain a `"config"` dict with additional configurations for the configured pairlist. +This Pairlist-object may contain configurations with additional configurations for the configured pairlist. By convention, `"number_assets"` is used to specify the maximum number of pairs to keep in the whitelist. Please follow this to ensure a consistent user experience. Additional elements can be configured as needed. `VolumePairList` uses `"sort_key"` to specify the sorting value - however feel free to specify whatever is necessary for your great algorithm to be successfull and dynamic. diff --git a/freqtrade/pairlist/VolumePairList.py b/freqtrade/pairlist/VolumePairList.py index 708c8d7c2..2df9ba691 100644 --- a/freqtrade/pairlist/VolumePairList.py +++ b/freqtrade/pairlist/VolumePairList.py @@ -28,7 +28,7 @@ class VolumePairList(IPairList): 'for "pairlist.config.number_assets"') self._number_pairs = self._pairlistconfig['number_assets'] self._sort_key = self._pairlistconfig.get('sort_key', 'quoteVolume') - self._ttl = self._pairlistconfig.get('ttl', 1800) + self.refresh_period = self._pairlistconfig.get('refresh_period', 1800) if not self._exchange.exchange_has('fetchTickers'): raise OperationalException( @@ -67,7 +67,7 @@ class VolumePairList(IPairList): :return: new whitelist """ # Generate dynamic whitelist - if self._last_refresh + self._ttl < datetime.now().timestamp(): + if self._last_refresh + self.refresh_period < datetime.now().timestamp(): self._last_refresh = int(datetime.now().timestamp()) return self._gen_pair_whitelist(pairlist, tickers,