20 Commits

Author SHA1 Message Date
dekun aa1a2da2b7 距平衡改为行权价到平衡价的价差
Call 为 BE−K、Put 为 K−BE;链/下单/持仓统一;顺带修复 format_position_row 中 row_mode 引用顺序。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:21:31 +08:00
dekun 57cca5554e 划转默认折叠,修复币本位到期平衡计算
币本位权利金为币报价,到期平衡按 OKX 结算公式 K/(1±p) 计算;链/持仓/跨式平衡带同步修正。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:15:33 +08:00
dekun a7bec5e121 修复币本位期权残档判定:内在价值按币报价(S-K)/S,避免与美元点差混比误杀有效买一
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:21:54 +08:00
dekun 1314349fe5 修复币本位期权杠杆显示:按1/卖一而非指数/卖一
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:18:15 +08:00
dekun 1522117eeb 单独期权增加全仓复利模式:可选上限开关,仅允许一仓
用期权户全部可用×缓冲开仓,默认不设上限;开启上限后按 env 封顶,全仓时禁止已有持仓再开。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 09:45:36 +08:00
dekun a2075ba73e Cap options budget-full sizing at min(balance, trade budget) with UI hint.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 08:54:38 +08:00
dekun 1909eea654 Use bid1-only option closes with hard-disabled market exits.
Manual close checks liquidity only; target auto still requires 2x recycle hold once, then reuses the shared bid1 executor. Add /options/guide doc and update hedge-plan refs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:49:06 +08:00
dekun c025c06fac Block option auto-close on stub bids far below mark.
Reject target and depth closes when bid is a residual tick, and show invalid-bid UI instead of recycling at junk prices.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:05:54 +08:00
dekun e15eca76f3 Show option net P/L from bid recycle minus premium.
Rename floating P/L to net P/L, align ROI, and display bid depth as price/liquidity for only the levels needed to close.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 20:54:15 +08:00
dekun 6f6545ce52 Add T-shaped options chain view with straddle metrics (phase A).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 15:00:50 +08:00
dekun c9c8388250 Improve options order estimates and chain filter defaults.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 14:37:53 +08:00
dekun 6e45604d93 Add depth-based option close flow.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 08:46:07 +08:00
dekun b733e551a0 Normalize fullwidth punctuation to ASCII across codebase.
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 23:42:26 +08:00
dekun 25879dd007 Show equivalent contract leverage on options order panel.
Display notional-over-premium leverage at current index and at the user target price for quick sizing comparison.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 16:58:25 +08:00
dekun 27921213b0 Add expiry profit estimate and remove chain quick-buy button.
Let users enter a target index in the order panel for estimated expiry P&L, and remove the redundant buy button from the options chain row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 16:46:21 +08:00
dekun 2cfc1a490f Show bid/ask liquidity as price per sheet in options chain.
Display OKX askSz and bidSz beside top-of-book prices in the chain table and order panel using price/sheets format.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 16:28:08 +08:00
dekun 99f13817f8 Add pre-buy expiry breakeven columns to options chain table.
Show estimated expiry balance and distance from index in the chain list and order panel using ask price before opening a position.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 16:21:22 +08:00
dekun 3570a6900e Add OKX options expiry and close breakeven to hub monitor and dashboard.
Expose bePx-based expiry balance and mark-to-close breakeven on positions so monitor and dashboard can show both labels per contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 16:10:03 +08:00
dekun c1647822fb feat: options sheet sizing, ITM/OTM labels, and 14-day chain view
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:06:45 +08:00
dekun 806bb074ab feat: add OKX options module with dual API, USDT/USDC convert, and docs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 08:17:27 +08:00