28 Commits

Author SHA1 Message Date
dekun 6f983ed2ab Try all OTM strikes in offset when nearest fails leverage.
Closest Call@1920 at 152x no longer blocks 1930/1940 that already clear 200x.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:52:26 +08:00
dekun 5ea54db43b Let semi-auto reopen nearest expiry; ignore one-expiry-per-day.
Far quarterly skips were masking usable near OTM quotes like 260810.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:48:07 +08:00
dekun f1e3d5527a Fix semi open stalls: one-leg asks, OTM realign, clearer pick errors.
Monitor no longer shows ATM Put bias while semi-auto is authorized for Call.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:43:00 +08:00
dekun 7db8b724ac Drive semi quote ladder by min remaining hours input.
Picks nearest expiry with hours >= threshold and refreshes the list as the field changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:20:28 +08:00
dekun 58c12aa160 Fix semi moneyness reset and show Call/Put ladder by view.
Use dirty ref so refresh cannot overwrite unsaved params; ladder fetches books for the selected side.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:13:37 +08:00
dekun d98bf46549 Restructure Plan UI for semi-auto tabs and T-quote ladder.
Hide amplitude card when filter off; compact semi form with rules; monitor tab keeps positions and market.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:01:12 +08:00
dekun 457838ef64 Extend semi-auto with ITM/ATM/OTM, offset, and 1:4 sizing.
Moneyness and perp:option units are plan-only; OTM enforces leverage >=180.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 11:42:57 +08:00
dekun 4585dba3c3 Add 永期半自动: human arm, machine open/close, then stop.
Settings toggle, Plan panel, Fleet monitor, exit locks and armed TOCTOU gates; docs and dual audits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 11:20:11 +08:00
dekun a88d708ea3 Add amplitude filter as first open gate for 永期 hedge.
Reuse OO amplitude settings (default off); Plan shows index/HL when filtering.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 21:41:51 +08:00
dekun ab612df818 Move settings hints into rules; add OO amplitude filter toggle default off.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:58:50 +08:00
dekun 0daac05ef5 Reject OO strikes more than 1% from amplitude high/low.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:50:12 +08:00
dekun 43a2a9634d Keep OO amplitude refreshed while holding a position.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:30:51 +08:00
dekun eaf94448a2 Treat option-option amplitude as a maximum cap.
Reject opens when range exceeds the setting; update UI and docs labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:35:39 +08:00
dekun 0659611d82 Show OTM option quotes in option-option mode.
Align session to amplitude Call/Put pair and replace perp/ATM market panels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:30:29 +08:00
dekun ec244c63c6 Add option-option hedge mode with SIM/LIVE parity.
Mutual hedge_mode, amplitude OTM selection, 1:1 risk sizing, win-leg/full close, dual audits and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:01:16 +08:00
dekun a10ecf7409 Gate one-open-per-expiry by historical expiry_ymd across days.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 07:35:44 +08:00
dekun 9427d9c429 Skip used/residual expiries so ATM monitors the next day.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 10:31:07 +08:00
dekun f1da2778ef Add one-expiry-per-day open rhythm gate (default on).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 16:39:32 +08:00
dekun 0ee1d8be5d Add fixed-direction switch for perp/option open side.
When enabled, lock perp long→buy Put or short→buy Call with ITM/ATM only; off keeps ATM/ask rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 19:18:12 +08:00
dekun dbc86a1ce6 Add Binance live trading, anti-stuck open/close recovery, and configurable rate limits.
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>
2026-07-26 21:35:10 +08:00
dekun 38ffbf728b Pin market watch to held option strike while a position is open.
Stop falling back to ATM quotes for unrealized/close PnL after ATM drifts or restart.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 18:37:20 +08:00
dekun 21ca5cbfe0 Survive Binance eapi 418/429 with cooldown, soft start, and no ticker raise.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:49:14 +08:00
dekun fff285c1f9 Add ATM open-offset toggle default off.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:42:20 +08:00
dekun 79c074ec6c Prefer open direction from ATM vs spot (below=Call/short, above=Put/long).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:39:23 +08:00
dekun ee0ec57f89 Gate opens when ATM-spot offset exceeds configurable max (default 3).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:32:36 +08:00
dekun 586469482e Fix Binance boot using OKX symbols after restart.
Startup ignored DB exchange choice and kept OKX ATM ids under a Binance health label, so option bid/ask stayed empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:13:19 +08:00
dekun 78fd046fb6 Add Binance SIM market adapter and exchange switch in settings.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 12:02:36 +08:00
dekun e19bb452f9 Split exchange and strategy modules for future Binance support.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 08:43:09 +08:00