Manual vs risk modes are exclusive; each open floors k to 1 decimal so estimated premium+fees stay within the loss budget.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
Match page max-width on ultrawide and move the plan subtitle into a collapsible rules section under the funds strip.
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>
Persist settle_index_px and surface formula in trade detail so expiry closes are not mistaken for book fills.
Co-authored-by: Cursor <cursoragent@cursor.com>
Backups land under /root/eth_hedge_backups; restore accepts zip body for new-server migration and restarts the process.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align docs so LIVE exit matches SIM fee buffer; manual full close now enters rest_seconds like auto/emergency.
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>
Document and enforce: A full dual-leg close, B perp-only when deep OTM with residual archive that does not block next open, and expiry settlement when target is missed.
Co-authored-by: Cursor <cursoragent@cursor.com>