stable/freqtrade/pairlist/StaticPairList.py

31 lines
794 B
Python
Raw Normal View History

2018-11-30 05:34:56 +00:00
"""
Static List provider
Provides lists as configured in config.json
"""
import logging
2018-12-05 19:44:56 +00:00
from freqtrade.pairlist.IPairList import IPairList
2018-11-30 05:34:56 +00:00
logger = logging.getLogger(__name__)
2018-12-05 19:44:56 +00:00
class StaticPairList(IPairList):
2018-11-30 05:34:56 +00:00
def __init__(self, freqtrade, config: dict) -> None:
2018-12-05 19:44:56 +00:00
super().__init__(freqtrade, config)
2018-11-30 05:34:56 +00:00
2018-12-03 19:31:25 +00:00
def short_desc(self) -> str:
"""
Short whitelist method description - used for startup-messages
-> Please overwrite in subclasses
"""
return f"{self.name}: {self.whitelist}"
2018-12-05 19:44:56 +00:00
def refresh_pairlist(self) -> None:
2018-11-30 05:34:56 +00:00
"""
2018-12-05 19:44:56 +00:00
Refreshes pairlists and assigns them to self._whitelist and self._blacklist respectively
2018-11-30 05:34:56 +00:00
"""
self._whitelist = self._validate_whitelist(self._config['exchange']['pair_whitelist'])