Add current_time to bot_loop_start callbak

This commit is contained in:
Matthias
2023-03-26 11:21:18 +02:00
parent b262f0b374
commit 86aef7cf9d
6 changed files with 12 additions and 6 deletions

View File

@@ -62,11 +62,12 @@ class AwesomeStrategy(IStrategy):
# ... populate_* methods
def bot_loop_start(self, **kwargs) -> None:
def bot_loop_start(self, current_time: datetime, **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 resource for comparison)
:param current_time: datetime object, containing the current datetime
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
"""
if self.config['runmode'].value in ('live', 'dry_run'):