mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve pairlock docstrings
This commit is contained in:
parent
5f63fdd8ad
commit
a143f7bc43
|
@ -719,6 +719,9 @@ class PairLock(_DECL_BASE):
|
|||
def unlock_pair(pair: str, now: Optional[datetime] = None) -> None:
|
||||
"""
|
||||
Release all locks for this pair.
|
||||
:param pair: Pair to unlock
|
||||
:param now: Datetime object (generated via datetime.now(timezone.utc)).
|
||||
defaults to datetime.utcnow()
|
||||
"""
|
||||
if not now:
|
||||
now = datetime.now(timezone.utc)
|
||||
|
|
|
@ -286,6 +286,7 @@ class IStrategy(ABC):
|
|||
:param pair: Pair to lock
|
||||
:param until: datetime in UTC until the pair should be blocked from opening new trades.
|
||||
Needs to be timezone aware `datetime.now(timezone.utc)`
|
||||
:param reason: Optional string explaining why the pair was locked.
|
||||
"""
|
||||
PairLock.lock_pair(pair, until, reason)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user