Commit Graph

145 Commits

Author SHA1 Message Date
dekun f5c553844f 币本位盈亏双显ETH/U(按指数换算);平仓卖币改为卖光交易户可用余额
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:45:32 +08:00
dekun a7bec5e121 修复币本位期权残档判定:内在价值按币报价(S-K)/S,避免与美元点差混比误杀有效买一
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:21:54 +08:00
dekun 87910ed71a 币本位买币改为按最大可开张数×权利金×可配缓冲,不全额兑换USDT
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:33:48 +08:00
dekun 4fb3be35ef 单笔期权默认改为币本位;未配置时按coin处理
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:05:44 +08:00
dekun 6c49c7d51c 币本位持仓卡权利金/回收/门控改为按ETH/BTC展示,避免误标USDC与两位小数抹零
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:36:34 +08:00
dekun 6c9825284f 币本位开仓遇保证金不足时自动减半张数重试一次
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:28:42 +08:00
dekun 9f3360e968 币本位开仓:张数留手续费缓冲,延长买币落账等待并修正51008文案
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:24:54 +08:00
dekun f3de3763bb 修复币本位报价误走USDC,中控补资金账户并隐藏零币余额
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:08:28 +08:00
dekun a84554e613 币本位顶栏资金显示USDT+ETH,单笔期权本位改为下拉选择
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:38:39 +08:00
dekun 1314349fe5 修复币本位期权杠杆显示:按1/卖一而非指数/卖一
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:18:15 +08:00
dekun 72c84bb993 实现OKX单笔期权币本位与USDT桥复利(中控只读,不改Gate)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:10:29 +08:00
dekun 86cf722117 修复翻倍倍数输入被刷回1:持仓轮询重绘时保留草稿,聚焦输入时跳过重绘。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 16:20:45 +08:00
dekun 2a33f74252 修复翻倍倍数无法手输:未勾选开启时不再 disabled,应用/勾选只控制是否监控。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 16:17:09 +08:00
dekun 271865fa3d 修复全仓复利关闭后仍无法开仓:前端不再残留选中全仓,后端强制改指定张数。
审计:开关关闭时隐藏全仓芯片并自动勾选指定张数;报价/余额热同步 compound_full_enabled;API 将 compound_full 归一为 sheets(缺张数默认1);单测覆盖开关开关两种归一路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 16:14:53 +08:00
dekun 8605efa2ed 翻倍出场监控中按钮改为取消;中控目标监控列显示倍数如1倍。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 10:37:31 +08:00
dekun cd23ea74a6 单独期权增加翻倍出场:可开关、自选倍数(默认1倍=盈利等于权利金),达标后买一限价平。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 10:31:29 +08:00
dekun 8dda7500df 修复期权页 Jinja 语法错误导致 HTTP 500。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 10:19:37 +08:00
dekun a8d6795837 全仓复利开启时隐藏并禁用单笔预算;关闭后才显示可用打满预算。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 10:00:50 +08:00
dekun 51e454b0f6 增加独立的全仓复利开关,与上限开关分离;关闭时隐藏下单模式并拒绝开仓。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 09:52:13 +08:00
dekun 1522117eeb 单独期权增加全仓复利模式:可选上限开关,仅允许一仓
用期权户全部可用×缓冲开仓,默认不设上限;开启上限后按 env 封顶,全仓时禁止已有持仓再开。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 09:45:36 +08:00
dekun a354811a6e 修复期权链拉取触发 OKX 50011 限频
为 instruments 加进程缓存并在限频时回退旧数据,前端遇 50011 不再连打重试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 17:31:46 +08:00
dekun 3d7d754ba3 单独期权下单预估改为显示盈亏比
目标位指数仅作到期实值参考,展示盈利÷本合约权利金;持仓目标行同步显示盈亏比。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 17:10:04 +08:00
dekun c5d3d9d6c1 期期出场改盈亏比:达目标平盈利腿,亏损腿残值20%或到期平
将上/下破目标价替换为盈亏比(盈利金额/初始权利金,默认2);残值平需买一流动性且权利金≤初始20%。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 16:44:45 +08:00
dekun 860ebef4a7 fix(options): expose chain DTE in env UI and show nearest expiries for OO
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 17:54:03 +08:00
dekun a90876d772 fix(options): expand-all widens money filter so more strikes show
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 17:45:02 +08:00
dekun 4bc238b014 Fix hub options float summary blank when bid book is invalid.
Stop treating total_received=0 as a real bid recycle, fall back to exchange upl for display totals, and keep row/summary aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 09:47:14 +08:00
dekun f19500bcd9 Fix options PnL backfill matching when the same contract is traded twice.
Match exchange history by sheets and open time so an earlier close is not overwritten with the later trade's PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 09:04:30 +08:00
dekun 25ed46e3f2 Default options chain to ATM plus 3 ITM and 3 OTM.
Apply the same window in list and T views; expand-all remains available on both.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 08:55:34 +08:00
dekun 09a763e47d Merge OKX dual APIs into one OKX_API_* account for perp and options.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:28:33 +08:00
dekun 747434a65e Add index-over-ask leverage column to options chain list.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 10:26:11 +08:00
dekun 4b4dca9e3c Fix strategy-logic P0s from audit: monitor false-flat, fill-confirmed open/close, mode gates.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 09:56:18 +08:00
dekun fdbbde08df Refresh env UI on trade-mode change; hide hedge review tabs in options mode.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 08:38:19 +08:00
dekun 83ce50b24e Add OKX three-way trade mode for options vs hedge.
Env OKX_TRADE_MODE selects standalone options, perp hedge, or OO hedge; hide the other module UI and use group or position limits per mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 08:28:50 +08:00
dekun f9c2a63cbc Preflight options position limit for dual-leg OO hedges.
Reject OO start when max active is under 2 free slots so limit=1 cannot open a half straddle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 08:17:17 +08:00
dekun 94c65cbd6e Add OKX options max active positions env gate.
Enforce concurrent option contract count on standalone and hedge buys; editable in env UI with hot reload (0 = unlimited).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 08:12:50 +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 ca499c6104 Send WeChat alerts on OKX options open and close.
Cover manual, target, and exchange/expiry sync with idempotent sent flags.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 00:48:15 +08:00
dekun 60ff45f098 Fix hedge option PnL match by parsing opened_at as Asia/Shanghai.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 10:21:52 +08:00
dekun 67a09b1de8 Fix options review light theme dark card/filter styles.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 10:14:26 +08:00
dekun 7e7666adfb Align hedge plan option leg PnL with OKX exchange history.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 10:09:44 +08:00
dekun 6876515160 Align options review PnL with OKX positions-history realizedPnl.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 10:05:27 +08:00
dekun d2028ed0ee Show options budget buffer ratio in open-order rule tip.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 10:37:20 +08:00
dekun 00d76ba20f Stop browser autofill stuffing login username into transfer amount fields.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 10:14:14 +08:00
dekun 88d460d484 Options: collapse open rules; move open-guard tip into risk policy.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:46:02 +08:00
dekun ed1ec6f14a Options: default nearest expiry and env ask-liquidity chain filter.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:37:39 +08:00
dekun 972ef4f910 Options: loosen order dialog spacing and stack mode/note rows.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:15:55 +08:00
dekun 4e614eb9ed Options: frame target and size-mode chips like cancel buttons.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:11:23 +08:00
dekun 547eedeec4 Options: show order form as viewport modal on select.
Stop inserting the panel under the strike row; mount backdrop on body with cancel/Esc close.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:06:07 +08:00
dekun 19b46d19fd Options: eth-amount dialog, stop note autofill, pending tab in positions.
Selecting 指定币数量 opens an order dialog; pending orders move into a 当前委托 tab after 当前持仓; harden remark autofill that showed dekun.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 08:00:39 +08:00
dekun debfb116fd Expand options review table columns and color result tags.
Show direction, hold time, and entry logic; paint 盈利 green and 亏损 red.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 16:49:35 +08:00