feat: 监控区 2x2 布局与左上今日统计卡
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user