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>
Selecting 指定币数量 opens an order dialog; pending orders move into a 当前委托 tab after 当前持仓; harden remark autofill that showed dekun.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hide deleted rows by history key and contract/close fingerprint so local options_trades imports no longer resurrect them.
Co-authored-by: Cursor <cursoragent@cursor.com>
Block mark-as-ask opens, show reference mark when no depth, cap sheets to ask size; leave close paths unchanged. Document in docs/更新文档.md.
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the order host out of tbody wipes, sync pick-button labels, and retry/fallback OKX meta under rate limits so live contracts are not reported as missing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Thead rows used a .hidden class with no CSS rule on instance pages, so both header sets stayed visible.
Co-authored-by: Cursor <cursoragent@cursor.com>
Skip full card redraw while the monitor target field is focused, and format mark/avg without relying on dusty server strings.
Co-authored-by: Cursor <cursoragent@cursor.com>
Header float PnL now uses bid recycle minus premium like position cards. Stats adds realized/open/total net PnL.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
Default to in-the-money view with at-the-money contracts included; update expiry counts and empty states for the active filter.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use stale-while-revalidate for positions API and UI, throttle sync calls, and avoid overwriting displayed PnL with null on transient failures.
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>