Show pure-options header trade stats on every navigation page.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user