From 1496a9fee31f98ff71db3da078281a58629a0350 Mon Sep 17 00:00:00 2001 From: anor Date: Tue, 10 Mar 2026 14:04:32 +1000 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=20/report=20=D0=B8=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA?= =?UTF-8?q?=D0=B0=20=C2=AB=D0=9E=D1=82=D1=87=D1=91=D1=82=C2=BB=20=D0=B2=20?= =?UTF-8?q?Telegram=20=D0=B1=D0=BE=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /report — утренний отчёт по запросу (сделки, PnL, milestones валидации) - Кнопка 📋 Отчёт в persistent keyboard - Обновлена справка /help Co-Authored-By: Claude Opus 4.6 --- src/remizov_trader/cli.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/remizov_trader/cli.py b/src/remizov_trader/cli.py index 87eb25a..efa927f 100644 --- a/src/remizov_trader/cli.py +++ b/src/remizov_trader/cli.py @@ -290,8 +290,8 @@ def _send_with_keyboard(cfg, text: str, keyboard=None): # Persistent reply keyboard (bottom of screen) _REPLY_KEYBOARD = { "keyboard": [ - [{"text": "\U0001f4ca Статус"}, {"text": "\U0001f4b0 Баланс"}], - [{"text": "\u2696\ufe0f Плечо"}, {"text": "\u2753 Помощь"}], + [{"text": "\U0001f4ca Статус"}, {"text": "\U0001f4cb Отчёт"}], + [{"text": "\U0001f4b0 Баланс"}, {"text": "\u2696\ufe0f Плечо"}, {"text": "\u2753 Помощь"}], ], "resize_keyboard": True, "is_persistent": True, @@ -304,6 +304,7 @@ def _send_help(cfg): "\U0001f916 RemizovTrader — Команды\n" "\n" "/status — портфель, позиции, статистика\n" + "/report — утренний отчёт (сделки, PnL, валидация)\n" "/balance — баланс на бирже\n" "/leverage — текущее плечо\n" "/leverage N — установить плечо (1-10)\n" @@ -365,7 +366,7 @@ def _start_telegram_listener(cfg, get_db_fn): import httpx - from .notify import format_status_report, send_telegram + from .notify import format_morning_report, format_status_report, send_telegram # Map button text to commands _button_map = { @@ -373,6 +374,7 @@ def _start_telegram_listener(cfg, get_db_fn): "\U0001f4b0 баланс": "/balance", "\u2696\ufe0f плечо": "/leverage", "\u2753 помощь": "/help", + "\U0001f4cb отчёт": "/report", } def handle_command(text: str): @@ -384,6 +386,11 @@ def _start_telegram_listener(cfg, get_db_fn): report = format_status_report(cfg, conn) conn.close() send_telegram(cfg.telegram, report) + elif cmd == "/report": + conn = get_db_fn() + report = format_morning_report(cfg, conn) + conn.close() + send_telegram(cfg.telegram, report) elif cmd == "/leverage": _handle_leverage(cfg, mapped, send_telegram) elif cmd == "/balance":