mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-12 12:12:04 +08:00
BLD: refinements to positions synchronization in live mode
This commit is contained in:
@@ -279,6 +279,15 @@ class NotEnoughCapitalError(ZiplineError):
|
||||
).strip()
|
||||
|
||||
|
||||
class NotEnoughCashError(ZiplineError):
|
||||
msg = (
|
||||
'Total {currency} amount on {exchange} is lower than the cash '
|
||||
'reserved for this algo: {free} < {cash}. While trades can be made on '
|
||||
'the exchange accounts outside of the algo, exchange must have enough '
|
||||
'free {currency} to cover the algo cash.'
|
||||
).strip()
|
||||
|
||||
|
||||
class LastCandleTooEarlyError(ZiplineError):
|
||||
msg = (
|
||||
'The trade date of the last candle {last_traded} is before the '
|
||||
@@ -306,12 +315,3 @@ class BalanceTooLowError(ZiplineError):
|
||||
'add positions to hold a free amount greater than {amount}, or clean '
|
||||
'the state of this algo and restart.'
|
||||
).strip()
|
||||
|
||||
|
||||
class CashTooLowError(ZiplineError):
|
||||
msg = (
|
||||
'Total {currency} amount on exchanges is lower than the cash reserved '
|
||||
'for this algo: {free} < {cash}. While trades can be made on the '
|
||||
'exchange accounts outside of the algo, they must not compromise '
|
||||
'the required amount of free {currency}.'
|
||||
).strip()
|
||||
|
||||
Reference in New Issue
Block a user