mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Add option pairlist parameter type
This commit is contained in:
@@ -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
|
||||
]
|
||||
|
||||
|
||||
@@ -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'.",
|
||||
},
|
||||
|
||||
@@ -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.",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user