Add locks per pair

This commit is contained in:
Matthias
2020-10-24 16:52:26 +02:00
parent ff7ba23477
commit 2a66c33a4e
6 changed files with 101 additions and 2 deletions

View File

@@ -36,3 +36,12 @@ class IProtection(LoggingMixin, ABC):
Stops trading (position entering) for all pairs
This must evaluate to true for the whole period of the "cooldown period".
"""
@abstractmethod
def stop_per_pair(self, pair: str, date_now: datetime) -> ProtectionReturn:
"""
Stops trading (position entering) for this pair
This must evaluate to true for the whole period of the "cooldown period".
:return: Tuple of [bool, until, reason].
If true, this pair will be locked with <reason> until <until>
"""