Notification upgrades: lifecycle, configurable levels, summaries
- NOTIFY_LEVELS chooses which event levels are sent (default trade,error). - NOTIFY_LIFECYCLE sends explicit start/stop messages; the kill switch always notifies at error level. - SUMMARY_INTERVAL_MINUTES sends a periodic portfolio summary (equity, per strategy P&L, allocation, halted state) via a background task started with the run and stopped on stop/kill/shutdown. - Wires the new vars plus the go-live vars through both compose files and the deploy workflow. Adds tests.
This commit is contained in:
1 parent
ef3e6f346c
commit
2ca5032e7e
8 files changed
+203
-5
No files matched your search
@@ -191,6 +191,15 @@ best-effort: a failing channel never affects trading. For Telegram, create a bot
|
||||
with [@BotFather](https://t.me/BotFather), message it once, then read the chat id
|
||||
from `https://api.telegram.org/bot<token>/getUpdates`.
|
||||
|
||||
Additional controls:
|
||||
|
||||
- `NOTIFY_LEVELS` (default `trade,error`) — which event levels to send; add
|
||||
`warning` or `info`.
|
||||
- `NOTIFY_LIFECYCLE` (default `true`) — explicit start/stop messages; the kill
|
||||
switch always notifies.
|
||||
- `SUMMARY_INTERVAL_MINUTES` (default `0`) — periodic portfolio summary (equity,
|
||||
per-strategy P&L and allocation).
|
||||
|
||||
## Adding a strategy
|
||||
|
||||
Drop a file in `backend/app/engine/strategies/` — it is auto-discovered and
|
||||
|
||||
Reference in new issue
Block a user