Add documentation for bot_loop_start

This commit is contained in:
Matthias
2020-06-14 07:00:55 +02:00
parent 77056a3119
commit bc821c7c20
5 changed files with 50 additions and 1 deletions

View File

@@ -151,6 +151,8 @@ class FreqtradeBot:
self.dataprovider.refresh(self.pairlists.create_pair_list(self.active_pair_whitelist),
self.strategy.informative_pairs())
strategy_safe_wrapper(self.strategy.bot_loop_start)()
self.strategy.analyze(self.active_pair_whitelist)
with self._sell_lock:

View File

@@ -194,7 +194,7 @@ class IStrategy(ABC):
"""
Called at the start of the bot iteration (one loop).
Might be used to perform pair-independent tasks
(e.g. like lock pairs with negative profit in the last hour)
(e.g. gather some remote ressource for comparison)
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
"""
pass

View File

@@ -1,4 +1,13 @@
def bot_loop_start(self, **kwargs) -> None:
"""
Called at the start of the bot iteration (one loop).
Might be used to perform pair-independent tasks
(e.g. gather some remote ressource for comparison)
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
"""
pass
def check_buy_timeout(self, pair: str, trade: 'Trade', order: dict, **kwargs) -> bool:
"""
Check buy timeout function callback.