Show pure-options header trade stats on every navigation page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-16 16:13:27 +08:00
parent 48ea7e1bc7
commit 72d8daf15c
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -5134,7 +5134,8 @@ def render_main_page(page="options", embed_mode=None):
records = []
total = rate = 0
profit_loss_ratio = None
if page == "options" and OKX_OPTIONS_ENABLED:
# 顶栏总交易/胜率/盈亏比:期权开启时全站读纯期权,与当前导航页无关
if OKX_OPTIONS_ENABLED:
try:
from lib.options.options_stats_lib import header_options_stats_for_window
@@ -5492,8 +5493,7 @@ def api_account_snapshot():
)
header_trade_stats = header_trade_stats_for_window(conn, _list_window_from_request(), APP_TZ)
page_hint = (request.args.get("page") or "").strip().lower()
if page_hint == "options" and OKX_OPTIONS_ENABLED:
if OKX_OPTIONS_ENABLED:
try:
from lib.options.options_stats_lib import header_options_stats_for_window