Move mode switch to HEDGE_PLAN_OPTION_PRIMARY, split left into capital/select/exit groups, and show perp quote above options with leverage auto-match.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer perpetual symbols and normalize before market.contractSize lookup so Gate BTC float matches ~0.4U not thousands.
Co-authored-by: Cursor <cursoragent@cursor.com>
Compute float_pnl and tp_profit from mark/entry/contracts using each exchange contract size during dashboard enrich.
Co-authored-by: Cursor <cursoragent@cursor.com>
Unify Gate/OKX/Binance: disable the open button with a side note during force-close, cooloff, and daily freeze, and enforce the same gate server-side.
Co-authored-by: Cursor <cursoragent@cursor.com>
Env OKX_TRADE_MODE selects standalone options, perp hedge, or OO hedge; hide the other module UI and use group or position limits per mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enforce concurrent option contract count on standalone and hedge buys; editable in env UI with hot reload (0 = unlimited).
Co-authored-by: Cursor <cursoragent@cursor.com>
RISK_DAILY_LOSS_LIMIT (default 2, 0 disables) freezes new opens after N losing closes in the trading day.
Co-authored-by: Cursor <cursoragent@cursor.com>
API enriches entry/SL/TP with price_to_precision display strings; OKX formatter now uses the same path as Gate/Binance.
Co-authored-by: Cursor <cursoragent@cursor.com>
Defer exchange chart generation to a background thread and save via XHR so fill-from-trade no longer blocks on full page reload.
Co-authored-by: Cursor <cursoragent@cursor.com>
Background poll builds a memory snapshot; the page reads snapshot and refreshes on SSE instead of hitting heavy exchange APIs on each load.
Co-authored-by: Cursor <cursoragent@cursor.com>
Unify hub/instance TP profit, calc_pnl, and push/accounting to net of 0.05% per side; leave exchange floating PnL unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
Always SSR records summary on embed shell (including settings/risk/env), and refresh total/win-rate/PL ratio via account_snapshot so soft-nav cannot leave the strip blank.
Co-authored-by: Cursor <cursoragent@cursor.com>
Read-only overview of live orders, key monitors, and strategy; show options/hedge only when present. Toggle via system settings nav prefs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Paginate trade records, journals, and AI history at 5 per page with soft in-card flips; hide the journal form until 填入复盘.
Co-authored-by: Cursor <cursoragent@cursor.com>
Import closed OKX option history and closed hedge plans into one list for journaling, images, and stats without mixing contract reviews.
Co-authored-by: Cursor <cursoragent@cursor.com>