dekun
fc74b8e913
Align funds bar and win-rate with OO expiry intrinsic repair; wire Binance balances.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-11 17:18:16 +08:00
dekun
3264dd4381
Fix OO expiry settle index: persist spot and never invent strike from OTM fill.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-11 16:44:56 +08:00
dekun
3491681c28
Mirror option expiry settlements from exchange bills; debit OO LIVE open premiums.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-08 16:02:16 +08:00
dekun
8d67f3fc6c
Fix LIVE SoT P0/P1: closing state machine, OO exchange fills, BN balances.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-08 15:54:45 +08:00
dekun
99e58910d3
Treat exchange as LIVE SoT: expiry closes perp only, no invented option settles.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-08 15:44:15 +08:00
dekun
bf3441537e
Fix target-exit mismatch: correct close reason and executable PnL gate.
...
Locked premium exits no longer label as fixed_usdt; mark/book optimism no longer triggers close into a realized loss.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-07 22:05:34 +08:00
dekun
0ac03cc726
Align OO Call/Put position cards with per-leg mark, size, leverage.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-07 17:25:03 +08:00
dekun
24a860ad3f
Split OO budget per leg and size Call/Put independently.
...
Each half of the risk budget buys its own qty from ask; equal qty no longer forced.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-07 17:08:05 +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
a7aee8f425
Add control residual options table with liquidity-only manual close.
...
Fleet status exposes enriched residuals; manual close skips the premium recovery gate while auto mid-close remains unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-02 15:13:29 +08:00
dekun
469e7a258a
Harden residual mid-close: IOC partial fills, exchange reconcile, atomic book.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-02 14:41:00 +08:00
dekun
640ecc9530
Sell residual options at latest bid via IOC limit, not market.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-02 14:25:03 +08:00
dekun
62c91d4bd0
Close residual options when premium recovers above configurable threshold.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-02 14:19:21 +08:00
dekun
0e3b9e53ac
Enrich WeCom open/close notifies with Chinese qty, margin, and PnL.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-02 08:58:49 +08:00
dekun
22c42a19a0
Count exit fees in live/SIM net PnL as entry fee x2.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-01 09:27:41 +08:00
dekun
dffcd77837
Add trade move points; label option UPL price as bid not mark.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-31 15:44:52 +08:00
dekun
0837982714
Add OKX trading-account USDC auto-swap and lock exit target while in position.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-30 00:16:47 +08:00
dekun
101cb3c045
Fix ghost finalize on unknown perp size and open rollback hazards.
...
Distinguish exchange query None from flat zero; keep opening when size unknown; idempotent half_open cash; scan options while opening; continue manage after recover.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 20:47:29 +08:00
dekun
e2a19a1614
Recover stuck opening and harden LIVE open/close reconcile.
...
Stamp open intent, recover opening from exchange option/perp state, skip resell/reopen when already flat, and persist Binance margin mode.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 20:32:45 +08:00
dekun
44fd0371b9
Fix OKX abandon residual double-book and fill/residual ledger holes.
...
After dual-close leaves option pending, continue close_group instead of false residual; reject partial fills on wait timeout; LIVE residual settle allow_negative.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 20:20:36 +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
81e51236c0
Align funds to OKX funding/trading only; fold rules; match settings width.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 17:59:28 +08:00
dekun
5c3bd4b654
Add OKX-style funds bar with USDT/USDC convert and transfer.
...
SIM uses multi-wallet balances; LIVE hits OKX asset/account APIs and spot USDC-USDT swap. Funds strip hides sim labeling.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 17:06:13 +08:00
dekun
1c75db4a19
Split fee stats by leg and hide LIVE slip.
...
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 >
2026-07-29 16:37:18 +08:00
dekun
14c6ba51a8
Show trade open/close times and hold period by target exit.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-27 15:37:37 +08:00
dekun
9d3b36826c
Include LIVE close-fee estimate in target PnL; rest after manual and emergency close.
...
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 >
2026-07-26 22:58:10 +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
0cf3756b09
Harden LIVE opens with slot claim and exchange reconcile.
...
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 >
2026-07-26 22:39:27 +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
ca66c494e7
Use exchange fees, UPL, funding for LIVE PnL; USDC 1:1 to USDT.
...
Option open P&L stays local (option net); exit target ignores estimated close fees.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 21:49:20 +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
e51f357b48
Initial eth_hedge_sim: P0 market, auth UI, one-click deploy.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 16:33:25 +08:00