diff --git a/freqtrade/plugins/pairlist/IPairList.py b/freqtrade/plugins/pairlist/IPairList.py index f752db3b1..5f1b7e591 100644 --- a/freqtrade/plugins/pairlist/IPairList.py +++ b/freqtrade/plugins/pairlist/IPairList.py @@ -31,6 +31,12 @@ class __StringPairlistParameter(__PairlistParameterBase): default: Union[str, None] +class __OptionPairlistParameter(__PairlistParameterBase): + type: Literal["option"] + default: Union[str, None] + options: List[str] + + class __BoolPairlistParameter(__PairlistParameterBase): type: Literal["boolean"] default: Union[bool, None] @@ -39,6 +45,7 @@ class __BoolPairlistParameter(__PairlistParameterBase): PairlistParameter = Union[ __NumberPairlistParameter, __StringPairlistParameter, + __OptionPairlistParameter, __BoolPairlistParameter ] diff --git a/freqtrade/plugins/pairlist/ShuffleFilter.py b/freqtrade/plugins/pairlist/ShuffleFilter.py index b566a0ac2..5419295c9 100644 --- a/freqtrade/plugins/pairlist/ShuffleFilter.py +++ b/freqtrade/plugins/pairlist/ShuffleFilter.py @@ -59,8 +59,9 @@ class ShuffleFilter(IPairList): def available_parameters() -> Dict[str, PairlistParameter]: return { "shuffle_frequency": { - "type": "string", + "type": "option", "default": "candle", + "options": ["candle", "iteration"], "description": "Shuffle frequency", "help": "Shuffle frequency. Can be either 'candle' or 'iteration'.", }, diff --git a/freqtrade/plugins/pairlist/VolumePairList.py b/freqtrade/plugins/pairlist/VolumePairList.py index 9bca900c7..c6d9902a4 100644 --- a/freqtrade/plugins/pairlist/VolumePairList.py +++ b/freqtrade/plugins/pairlist/VolumePairList.py @@ -123,8 +123,9 @@ class VolumePairList(IPairList): "help": "Number of assets to use from the pairlist", }, "sort_key": { - "type": "string", + "type": "option", "default": "quoteVolume", + "options": SORT_VALUES, "description": "Sort key", "help": "Sort key to use for sorting the pairlist.", },