From d3b2b2972e9b32ec193f94b1b7c0a19b747a6658 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 10 Oct 2022 11:54:13 +0000 Subject: [PATCH] Update pairlist docstring to be less missleading --- freqtrade/plugins/pairlist/AgeFilter.py | 2 +- freqtrade/plugins/pairlist/IPairList.py | 6 +++--- freqtrade/plugins/pairlist/OffsetFilter.py | 2 +- freqtrade/plugins/pairlist/PerformanceFilter.py | 2 +- freqtrade/plugins/pairlist/PrecisionFilter.py | 2 +- freqtrade/plugins/pairlist/PriceFilter.py | 2 +- freqtrade/plugins/pairlist/ProducerPairList.py | 4 ++-- freqtrade/plugins/pairlist/ShuffleFilter.py | 2 +- freqtrade/plugins/pairlist/SpreadFilter.py | 2 +- freqtrade/plugins/pairlist/StaticPairList.py | 4 ++-- freqtrade/plugins/pairlist/VolatilityFilter.py | 2 +- freqtrade/plugins/pairlist/VolumePairList.py | 4 ++-- freqtrade/plugins/pairlist/rangestabilityfilter.py | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) diff --git a/freqtrade/plugins/pairlist/AgeFilter.py b/freqtrade/plugins/pairlist/AgeFilter.py index 70638936a..7c8cdb5ab 100644 --- a/freqtrade/plugins/pairlist/AgeFilter.py +++ b/freqtrade/plugins/pairlist/AgeFilter.py @@ -70,7 +70,7 @@ class AgeFilter(IPairList): def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]: """ :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new allowlist """ needed_pairs: ListPairsWithTimeframes = [ diff --git a/freqtrade/plugins/pairlist/IPairList.py b/freqtrade/plugins/pairlist/IPairList.py index c02ba5ef5..60abac6a1 100644 --- a/freqtrade/plugins/pairlist/IPairList.py +++ b/freqtrade/plugins/pairlist/IPairList.py @@ -69,7 +69,7 @@ class IPairList(LoggingMixin, ABC): filter_pairlist() method. :param pair: Pair that's currently validated - :param ticker: ticker dict as returned from ccxt.fetch_tickers() + :param ticker: ticker dict as returned from ccxt.fetch_ticker :return: True if the pair can stay, false if it should be removed """ raise NotImplementedError() @@ -85,7 +85,7 @@ class IPairList(LoggingMixin, ABC): it will raise the exception if a Pairlist Handler is used at the first position in the chain. - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: List of pairs """ raise OperationalException("This Pairlist Handler should not be used " @@ -103,7 +103,7 @@ class IPairList(LoggingMixin, ABC): own filtration. :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ if self._enabled: diff --git a/freqtrade/plugins/pairlist/OffsetFilter.py b/freqtrade/plugins/pairlist/OffsetFilter.py index 149befdeb..c9531ece1 100644 --- a/freqtrade/plugins/pairlist/OffsetFilter.py +++ b/freqtrade/plugins/pairlist/OffsetFilter.py @@ -47,7 +47,7 @@ class OffsetFilter(IPairList): Filters and sorts pairlist and returns the whitelist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ if self._offset > len(pairlist): diff --git a/freqtrade/plugins/pairlist/PerformanceFilter.py b/freqtrade/plugins/pairlist/PerformanceFilter.py index c29b4f337..4cc92175a 100644 --- a/freqtrade/plugins/pairlist/PerformanceFilter.py +++ b/freqtrade/plugins/pairlist/PerformanceFilter.py @@ -44,7 +44,7 @@ class PerformanceFilter(IPairList): Filters and sorts pairlist and returns the allowlist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new allowlist """ # Get the trading performance for pairs from database diff --git a/freqtrade/plugins/pairlist/PrecisionFilter.py b/freqtrade/plugins/pairlist/PrecisionFilter.py index 8f1c9b839..98cb3ba46 100644 --- a/freqtrade/plugins/pairlist/PrecisionFilter.py +++ b/freqtrade/plugins/pairlist/PrecisionFilter.py @@ -49,7 +49,7 @@ class PrecisionFilter(IPairList): Check if pair has enough room to add a stoploss to avoid "unsellable" buys of very low value pairs. :param pair: Pair that's currently validated - :param ticker: ticker dict as returned from ccxt.fetch_tickers() + :param ticker: ticker dict as returned from ccxt.fetch_ticker :return: True if the pair can stay, false if it should be removed """ if ticker.get('last', None) is None: diff --git a/freqtrade/plugins/pairlist/PriceFilter.py b/freqtrade/plugins/pairlist/PriceFilter.py index f2952001a..a6b400a38 100644 --- a/freqtrade/plugins/pairlist/PriceFilter.py +++ b/freqtrade/plugins/pairlist/PriceFilter.py @@ -68,7 +68,7 @@ class PriceFilter(IPairList): """ Check if if one price-step (pip) is > than a certain barrier. :param pair: Pair that's currently validated - :param ticker: ticker dict as returned from ccxt.fetch_tickers() + :param ticker: ticker dict as returned from ccxt.fetch_ticker :return: True if the pair can stay, false if it should be removed """ if ticker.get('last', None) is None or ticker.get('last') == 0: diff --git a/freqtrade/plugins/pairlist/ProducerPairList.py b/freqtrade/plugins/pairlist/ProducerPairList.py index 50b674e60..740cb4ec2 100644 --- a/freqtrade/plugins/pairlist/ProducerPairList.py +++ b/freqtrade/plugins/pairlist/ProducerPairList.py @@ -71,7 +71,7 @@ class ProducerPairList(IPairList): def gen_pairlist(self, tickers: Dict) -> List[str]: """ Generate the pairlist - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: List of pairs """ pairs = self._filter_pairlist(None) @@ -84,7 +84,7 @@ class ProducerPairList(IPairList): Filters and sorts pairlist and returns the whitelist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ return self._filter_pairlist(pairlist) diff --git a/freqtrade/plugins/pairlist/ShuffleFilter.py b/freqtrade/plugins/pairlist/ShuffleFilter.py index b6b5fc3c8..6eb4231bc 100644 --- a/freqtrade/plugins/pairlist/ShuffleFilter.py +++ b/freqtrade/plugins/pairlist/ShuffleFilter.py @@ -52,7 +52,7 @@ class ShuffleFilter(IPairList): Filters and sorts pairlist and returns the whitelist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ # Shuffle is done inplace diff --git a/freqtrade/plugins/pairlist/SpreadFilter.py b/freqtrade/plugins/pairlist/SpreadFilter.py index 1f20af305..1f6d4f687 100644 --- a/freqtrade/plugins/pairlist/SpreadFilter.py +++ b/freqtrade/plugins/pairlist/SpreadFilter.py @@ -48,7 +48,7 @@ class SpreadFilter(IPairList): """ Validate spread for the ticker :param pair: Pair that's currently validated - :param ticker: ticker dict as returned from ccxt.fetch_tickers() + :param ticker: ticker dict as returned from ccxt.fetch_ticker :return: True if the pair can stay, false if it should be removed """ if 'bid' in ticker and 'ask' in ticker and ticker['ask'] and ticker['bid']: diff --git a/freqtrade/plugins/pairlist/StaticPairList.py b/freqtrade/plugins/pairlist/StaticPairList.py index 83a0fa0c8..5b1337754 100644 --- a/freqtrade/plugins/pairlist/StaticPairList.py +++ b/freqtrade/plugins/pairlist/StaticPairList.py @@ -42,7 +42,7 @@ class StaticPairList(IPairList): def gen_pairlist(self, tickers: Dict) -> List[str]: """ Generate the pairlist - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: List of pairs """ if self._allow_inactive: @@ -58,7 +58,7 @@ class StaticPairList(IPairList): Filters and sorts pairlist and returns the whitelist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ pairlist_ = deepcopy(pairlist) diff --git a/freqtrade/plugins/pairlist/VolatilityFilter.py b/freqtrade/plugins/pairlist/VolatilityFilter.py index c9af3a7b3..c06fc09ba 100644 --- a/freqtrade/plugins/pairlist/VolatilityFilter.py +++ b/freqtrade/plugins/pairlist/VolatilityFilter.py @@ -66,7 +66,7 @@ class VolatilityFilter(IPairList): """ Validate trading range :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new allowlist """ needed_pairs: ListPairsWithTimeframes = [ diff --git a/freqtrade/plugins/pairlist/VolumePairList.py b/freqtrade/plugins/pairlist/VolumePairList.py index b290f76aa..bfecbd62a 100644 --- a/freqtrade/plugins/pairlist/VolumePairList.py +++ b/freqtrade/plugins/pairlist/VolumePairList.py @@ -113,7 +113,7 @@ class VolumePairList(IPairList): def gen_pairlist(self, tickers: Dict) -> List[str]: """ Generate the pairlist - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: List of pairs """ # Generate dynamic whitelist @@ -150,7 +150,7 @@ class VolumePairList(IPairList): Filters and sorts pairlist and returns the whitelist again. Called on each bot iteration - please use internal caching if necessary :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new whitelist """ if self._use_range: diff --git a/freqtrade/plugins/pairlist/rangestabilityfilter.py b/freqtrade/plugins/pairlist/rangestabilityfilter.py index 1bc7ad48f..ca844f003 100644 --- a/freqtrade/plugins/pairlist/rangestabilityfilter.py +++ b/freqtrade/plugins/pairlist/rangestabilityfilter.py @@ -64,7 +64,7 @@ class RangeStabilityFilter(IPairList): """ Validate trading range :param pairlist: pairlist to filter or sort - :param tickers: Tickers (from exchange.get_tickers()). May be cached. + :param tickers: Tickers (from exchange.get_tickers). May be cached. :return: new allowlist """ needed_pairs: ListPairsWithTimeframes = [