@@ -4,9 +4,9 @@ Static Pair List provider
|
||||
Provides pair white list as it configured in config
|
||||
"""
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.plugins.pairlist.IPairList import IPairList
|
||||
|
||||
|
||||
@@ -20,10 +20,6 @@ class StaticPairList(IPairList):
|
||||
pairlist_pos: int) -> None:
|
||||
super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
|
||||
|
||||
if self._pairlist_pos != 0:
|
||||
raise OperationalException(f"{self.name} can only be used in the first position "
|
||||
"in the list of Pairlist Handlers.")
|
||||
|
||||
self._allow_inactive = self._pairlistconfig.get('allow_inactive', False)
|
||||
|
||||
@property
|
||||
@@ -64,4 +60,8 @@ class StaticPairList(IPairList):
|
||||
:param tickers: Tickers (from exchange.get_tickers()). May be cached.
|
||||
:return: new whitelist
|
||||
"""
|
||||
return pairlist
|
||||
pairlist_ = deepcopy(pairlist)
|
||||
for pair in self._config['exchange']['pair_whitelist']:
|
||||
if pair not in pairlist_:
|
||||
pairlist_.append(pair)
|
||||
return pairlist_
|
||||
|
Reference in New Issue
Block a user