Manual close checks liquidity only; target auto still requires 2x recycle hold once, then reuses the shared bid1 executor. Add /options/guide doc and update hedge-plan refs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Require bid-side recoverable premium at least 2x cost continuously before target auto-close or depth close can fire.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject target and depth closes when bid is a residual tick, and show invalid-bid UI instead of recycling at junk prices.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rename floating P/L to net P/L, align ROI, and display bid depth as price/liquidity for only the levels needed to close.
Co-authored-by: Cursor <cursoragent@cursor.com>
Commit monitor status before notify, and use a closing state so unfilled limits retry silently instead of re-alerting.
Co-authored-by: Cursor <cursoragent@cursor.com>
Position and order forms can arm a target; right-side and hub panels show active monitors; expiry remains the stop with no separate SL.
Co-authored-by: Cursor <cursoragent@cursor.com>
Apply force-close defaults only when keys are missing so system-settings toggles survive pull_and_restart.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace single S* with up/down targets across UI, preview, persist, monitor, and alerts so ranging breakouts can close the winner either way.
Co-authored-by: Cursor <cursoragent@cursor.com>
History shows contract names with clickable fill details; stats split perp vs options plans for win rate, profit factor, max win/loss, and drawdown.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire idempotent notify on open/close/partial fail, settle OO at expiry, and close orphaned TP option legs without rewriting plan totals.
Co-authored-by: Cursor <cursoragent@cursor.com>
Swap-all targets funding account but ccxt free was often empty; fall back to trading USDT for unified accounts and show balances in errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
OKX requires quote_ccy/base_ccy for market orders; include trading_usdt in balance display and total funds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Share history loading between history and stats APIs so average profit/loss matches the option history tab.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose avg_win and avg_loss from stats API and update chart labels and values to match the average-based P/L ratio.
Co-authored-by: Cursor <cursoragent@cursor.com>
Filter OKX positions-history to type 2/3/6, format premium and bid recovery to 2 decimals, and allow locally hiding rows via delete button.
Co-authored-by: Cursor <cursoragent@cursor.com>
Format prices by tickSz, move bid depth/recovery to card end with plain styling, and load option history from OKX positions-history instead of local DB.
Co-authored-by: Cursor <cursoragent@cursor.com>
Show average hold duration for wins and losses, open positions, and CSS ring/bar visualizations in the stats tab.
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds order_type to journal uploads, removes legacy swing/trend labels from entry reason options, and ensures review-edit buttons sync when the records tab loads dynamically.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire bootstrap_deploy_secrets into setup_env.sh (one-time HUB_BRIDGE_TOKEN, FLASK_SECRET_KEY, HUB_SESSION_SECRET). Remove AI section from instance env UI; hub saves OPENAI settings to all four .env files. SSO unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
P1-P4: configurable nav/section visibility in system settings, full .env editor with restart badges, password change, runtime hot overrides, and single-instance pm2 restart. Works in hub embed iframe.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move read-only risk control docs to /risk_policy before settings; keep transfers and exports on the settings page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop skipping contracts with empty ask, bid, and mark so out-of-the-money strikes remain visible in the list.
Co-authored-by: Cursor <cursoragent@cursor.com>
Deep ITM contracts often have no ask on the book; show mark-based estimates with a tilde and restore breakeven calculations.
Co-authored-by: Cursor <cursoragent@cursor.com>
Display notional-over-premium leverage at current index and at the user target price for quick sizing comparison.
Co-authored-by: Cursor <cursoragent@cursor.com>
Let users enter a target index in the order panel for estimated expiry P&L, and remove the redundant buy button from the options chain row.
Co-authored-by: Cursor <cursoragent@cursor.com>
Display OKX askSz and bidSz beside top-of-book prices in the chain table and order panel using price/sheets format.
Co-authored-by: Cursor <cursoragent@cursor.com>