Prevent expiry dual-close from re-booking option cash, abandon ledger rejection, margin-mode mismatch, and manual close races; harden fill wait and refuse default AUTH_SECRET on LIVE.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hide sim equity when LIVE is selected; OKX funds bar uses exchange balances; add cross/isolated for perp only (options stay cash).
Co-authored-by: Cursor <cursoragent@cursor.com>
SIM shows perp/option fees and slip separately; LIVE keeps real exchange fees only with slip forced to zero.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent duplicate opens by atomically claiming an opening slot, verifying exchange perp is flat before live orders, setting leverage from ledger, and preferring exchange position size when closing perps.
Co-authored-by: Cursor <cursoragent@cursor.com>
OKX/Binance LIVE share half_open and option_closed_perp_pending repair paths; private REST throttles default to 1s and are tunable in settings.
Co-authored-by: Cursor <cursoragent@cursor.com>
Enable settings UI for mode/keys, gate strategy start when LIVE is not ready, and stop PM2 from forcing MODE=SIM.
Co-authored-by: Cursor <cursoragent@cursor.com>