修复顶栏盈亏比:币本位已平盈亏先折 U 再统计。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-08 22:31:36 +08:00
parent a45b5d1b0b
commit e8f8a76753
3 changed files with 131 additions and 65 deletions
+4 -2
View File
@@ -4024,7 +4024,9 @@ def render_main_page(page="options", embed_mode=None):
try:
from lib.options.options_stats_lib import header_options_stats_for_window
opt_header = header_options_stats_for_window(conn, list_window, APP_TZ)
opt_header = header_options_stats_for_window(
conn, list_window, APP_TZ, ex=exchange_options
)
total = opt_header["total"]
rate = opt_header["rate"]
profit_loss_ratio = opt_header.get("profit_loss_ratio")
@@ -4427,7 +4429,7 @@ def api_account_snapshot():
from lib.options.options_stats_lib import header_options_stats_for_window
header_trade_stats = header_options_stats_for_window(
conn, _list_window_from_request(), APP_TZ
conn, _list_window_from_request(), APP_TZ, ex=exchange_options
)
except Exception:
pass