dekun
5d161b4220
Add HEDGE_PO_MODE instance modes with shared sim/live path.
...
Lock one mode per instance/subaccount, cross-asset BTC option/ETH perp sizing, combo-U exit, and ship docs/tests/audit.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 20:05:25 +08:00
dekun
be00991568
Fix post-close auto sell: restore missing spot min-size helpers used by sim sell.
...
Sell was silently failing on ImportError; surface sell result in close alert notes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 16:58:09 +08:00
dekun
d54bbdfcb3
Fix close-path SQLite lock by releasing write lock before exchange/sim ops.
...
Also enable WAL and busy_timeout on get_db so concurrent sim writes wait instead of failing immediately.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 16:54:56 +08:00
dekun
a83b6794d8
Keep unflat legs on 当前持仓 after plan end.
...
Closed plans with open legs stay visible and closable so residual positions are not orphaned from the UI.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 16:51:33 +08:00
dekun
989accdc50
Wire manual close to actually flatten option then perp then sell coin.
...
UI 平仓 now calls /api/hedge-plan/<id>/close instead of end-only (不平仓).
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 16:49:24 +08:00
dekun
7d29181a04
Fix perp manual order watch_entry bug; slim dialog UI; nav shows 永期/期期.
...
Manual market_order was validated as watch (missing watch_entry=0). Collapse order calc into details, remove page head card, show mode name in nav.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 16:19:15 +08:00
dekun
d68e9c3946
永期手动下单:修币本位杠杆显示,张数定仓与双出场模式.
...
右侧以张数+比例算永续,杠杆取 env(BTC10/ETH5);开仓买币+5%滑点;出场可选盈利金额(扣双边费)或目标位;平仓后卖光币回 U.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 15:43:44 +08:00
dekun
88b7fb7a0a
Initial CoinOX instance: coin-margined options + USDT hedge.
...
Forked from crypto_monitor OKX instance (copy-only). Keeps standalone options, perp-options and options-options hedge; drops standalone perp entrypoints; forces coin margin; adds sim wallets; default port 5010.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-14 00:18:40 +08:00