dekun
200702d066
Harden strategy SoT: fail-closed funds gate, shared open pipeline, LIVE switch guards.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-30 01:06:32 +08:00
dekun
a47a9b6377
Polish risk sizing: 2dp money preview, editable ratio/exit, plan badge.
...
Exit unit and perp/option units scale with k; plan page shows 以损定仓.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 23:48:34 +08:00
dekun
3a4c8d639c
Add risk-based position sizing (以损定仓) with per-open k resize.
...
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 >
2026-07-29 23:32:42 +08:00
dekun
ec87cf2104
Fix LIVE open/close double-book and security audit findings.
...
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 >
2026-07-29 20:11:29 +08:00
dekun
c6e8f6fe1e
Support LIVE exchange funds and perp margin mode.
...
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 >
2026-07-29 19:57:09 +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
56a4007130
Add WeCom markdown alerts and keep target exits while strategy is paused.
...
Notify open/close/start/pause/fault with SIM vs LIVE venue labels; configure webhook in Settings.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 23:19:39 +08:00
dekun
16efa44ffb
Hide manual trade by default, block open while running, auto-refresh auth token.
...
Also fix flat-side reconcile to check both long and short residuals; document in 更新说明.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 22:43:38 +08:00
dekun
f48ea5bbcc
Audit fixes: LIVE symbols/fills/expiry/pending, security harden, add 更新说明.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 22:28:03 +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
e666230d0b
Add SIM/LIVE switch with API keys saved to .env and OKX live executor.
...
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 >
2026-07-26 21:08:39 +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
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
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
5dcec0fde0
Add configurable SIM equity (default 10k) and strategy docs.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-25 11:43:51 +08:00
dekun
b50c134f5b
Add weekend open skip, expiry force-close, and Chinese trade labels.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-25 10:28:33 +08:00
dekun
cce26e87b5
Add dual exit modes: fixed USDT or premium multiple.
...
Net PnL (after estimated close fees) drives auto close; Plan/Settings expose the choice.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-25 09:17:50 +08:00
dekun
9fd2a842af
Add option close liquidity gate with 30% bid/mark cap.
...
Block new opens while flat legs wait; emergency close bypasses the check.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-25 09:05:04 +08:00
dekun
3957a83761
Revise strategy: TTM+ATM+leverage option pick, % exit, perp leverage/margin.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-25 08:38:03 +08:00
dekun
5125c6702b
Fix running status color; add ETH qty settings with Chinese labels.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 17:24:27 +08:00
dekun
51b8bb8f8a
Implement P1 local matcher/ledger and P2 strategy engine.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 17:03:46 +08:00