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>
Prevents duplicate sells from stacking into short opens when the bid book is empty and mark fallback retries.
Co-authored-by: Cursor <cursoragent@cursor.com>
OKX expects reduceOnly as the string true; target auto-close also falls back to the live position mark price on empty books.
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>
Use available (free) balances for full-amount ops, support sub-account scope, and show clear success/failure feedback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enrich hub options snapshot with close preview and render read-only option position cards in exchange fullscreen view.
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>
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>
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>
Show estimated expiry balance and distance from index in the chain list and order panel using ask price before opening a position.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose bePx-based expiry balance and mark-to-close breakeven on positions so monitor and dashboard can show both labels per contract.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose /api/hub/options/snapshot from OKX instance and render options summary on hub monitor cards when the options capability is enabled.
Co-authored-by: Cursor <cursoragent@cursor.com>