feat: 监控区 2x2 布局与左上今日统计卡

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-04 23:10:32 +08:00
parent eb975b0133
commit 9deb58a38a
9 changed files with 362 additions and 24 deletions
+3
View File
@@ -630,6 +630,7 @@ def register_hub_routes(app):
fetch_trades_for_trading_day,
summarize_trades,
)
from lib.trade.daily_open_limit_lib import count_opens_for_trading_day
c = _ctx()
get_db = c.get("get_db")
@@ -651,6 +652,7 @@ def register_hub_routes(app):
row_to_dict_fn=c.get("row_to_dict"),
reset_hour=reset_hour,
)
opens_today = count_opens_for_trading_day(conn, trading_day)
finally:
conn.close()
stats = summarize_trades(trades)
@@ -659,6 +661,7 @@ def register_hub_routes(app):
"ok": True,
"trading_day": trading_day,
"trading_day_reset_hour": reset_hour,
"opens_today": opens_today,
"trades": trades,
"stats": stats,
}