Commit Graph

96 Commits

Author SHA1 Message Date
dekun e11651d729 实例期权页增加中控条件单卡片,接单后显示状态与触发参数。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 18:39:47 +08:00
dekun 07db158656 恢复币本位「重试卖回」常显,带鱼屏内容区改回 1800 居中留白。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 07:15:16 +08:00
dekun b79f309c5b 修复「重试卖回」按钮:有持仓时正确隐藏,标的按 BTC/ETH 残留与当前选择显示。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 07:05:13 +08:00
dekun 91ff1cdecc 权利金折 U 优先用开仓 budget_usdt,避免随币价浮动。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 03:23:46 +08:00
dekun a71042c3e1 中控汇总:Bridge 增加窗口化期权统计接口。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 02:59:19 +08:00
dekun 6d5b71eb3d 左侧条件单按方向绑定穿越:看跌上穿、看涨下穿。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 02:23:06 +08:00
dekun 2eb6b28a39 中控条件开仓单:客户端本地监控穿越/偏离区并按本机规则开平仓。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 02:13:16 +08:00
dekun bb6e9e9041 中控快照增加开仓权利金折U及占账户资金比例。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 16:13:36 +08:00
dekun fcef3b3d37 中控可下发买一全平:客户端新增 /api/hub/options/close,由本地执行并拒绝无效买一。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 16:03:10 +08:00
dekun 34322d1731 修复 BTC 币本位期权净盈亏被 round4 抹成 0 的精度问题。
币本位权利金/回收/盈亏改用 8 位小数,避免小额 BTC 报价显示为 0。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 14:45:54 +08:00
dekun c1f783df9b 中控快照增加买一/流动性字段,便于总览标黄不足仓位。
含买一价、张数、未覆盖张数与残档标记。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 12:39:13 +08:00
dekun e7a4934068 修复未登录时 API 返回 HTML 导致期权链 JSON 解析失败。
API 统一返回 401 JSON,并改进前端非 JSON 错误提示。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 11:51:13 +08:00
dekun 6f9e6e2a32 env 锁定币本位并清掉对冲/USDC 配置项。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 23:42:10 +08:00
dekun 2e09814fe5 修复删对冲后持仓接口 NameError:恢复 tgt_map/profit_exit_map 赋值。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 23:33:54 +08:00
dekun 0acba5e351 移除全部对冲计划模块:crypto_okx 改为币本位单独期权执行机。
交易模式锁定 options;okx_trade_mode / 到期盈亏迁入 options;保留期权/桥/关键位/企微与中控预留快照口径。恢复点:backup/before-remove-hedge 与 tag backup-before-remove-hedge-20260930。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 23:20:21 +08:00
dekun 8a62cfbb48 修复比特币期权浮盈把币数量当成 U:看板/中控改为按指数折 USDT。
币本位 BTC/ETH 净盈亏须 × 指数后再标 U;并兜底从合约推断 premium_ccy,避免缺失时漏折算。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 22:01:41 +08:00
dekun 06f9b23f44 修复翻倍出场达标却不自动平:对冲异常不再整段跳过,并按买一价×全仓判定。
原先对冲表异常会直接 return 0 导致翻倍出场永不执行;可回收改为买一价×全部张数,买一深度不足时仍会触发分批平仓。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 21:54:00 +08:00
dekun a7015ec5c8 修复期权分批平仓只记最后一笔收回导致盈亏漏算。
每次部分成交累加权利金与张数,全平后再合计 realized_pnl,并优先匹配交易所全平历史。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 21:13:05 +08:00
dekun f5104fe68b 修复翻倍/目标位平仓把备注写进平仓时间:纠正 SQL 参数顺序并自动对调历史坏数据。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 05:48:42 +08:00
dekun d6bb99b5bb 移植期权复盘自动K线、时区修复与保存后轮询展示,与今日 crypto_monitor 改动对齐。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 11:51:41 +08:00
dekun 37f787e6a9 Make options target close gate configurable via env.
Support premium multiplier (coin default 1.05) or net-PnL USDT threshold with index conversion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 09:00:39 +08:00
dekun 1a5d565b03 Rename options UI label from 距平衡 to 平衡价差.
Clarifies the column shows strike-to-expiry-breakeven spread, not index distance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:23:20 +08:00
dekun af3bc5f62a Fix dist-to-breakeven as strike-to-equilibrium spread.
Chain and order panel now show expiry_be minus strike instead of index distance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:16:03 +08:00
dekun 6d2d345b70 Fix coin-margin expiry breakeven to use coin premium formula.
Use K/(1-p) and K/(1+p) for coin calls/puts instead of adding ETH premium to USD strike; align T-view straddle band with coin quotes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:11:52 +08:00
dekun 68869e35c3 Move spot sell retry into positions header row per mockup.
Show trading-account coin balance with gradient retry button and icon refresh in the holdings title bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:06:09 +08:00
dekun a18f1f6713 Add spot sell retry UI; sell all trading-account coin on sell-back.
Fix coin-margin sell-back to use full available balance instead of bridge record; show retry banner and button on the options positions panel.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 08:01:06 +08:00
dekun 6215d0975d Harden env save against empty numerics; default coin margin and hedge off.
Reject blank float/int/select on save and parse env with safe helpers so options config edits cannot crash into 502; default OKX_TRADE_MODE=options and OKX_OPTIONS_MARGIN_MODE=coin.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 18:04:19 +08:00
dekun fc24114142 币本位数据统计改为U展示,已平盈亏按指数折U与浮盈口径一致。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 06:46:11 +08:00
dekun 4bda3b7703 修复复盘盈亏未按ETH指数折U;买一平仓取消确认,自动卖回USDT。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 22:08:28 +08:00
dekun e1c2e5889f 修复期权历史/复盘金额为0:模拟盘合成历史、币本位按ETH精度展示,复盘折算为U。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 21:51:01 +08:00
dekun 36724a902a 修复翻倍出场/翻倍提醒可能重复推微信:done状态停扫,提醒标记立即提交。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 18:04:40 +08:00
dekun 440778e9e6 补齐币本位期权开平仓微信推送:单位用ETH/BTC,手动/目标/翻倍平仓与翻倍提醒均必达。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:57:58 +08:00
dekun a7d0c2f875 买一平仓规则并入左侧开平仓规则说明,持仓区不再单独展示。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:47:46 +08:00
dekun 857974070e 顶栏实时盈亏:币本位按 ETH/BTC 指数折算为 USDT。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:25:49 +08:00
dekun e39dbd47c5 修复币本位买盘残档误判:内在价值按币报价(点差/指数)计算。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:22:17 +08:00
dekun f63b3d9f2a 修复模拟盘划转无效:期权页挂载划转脚本,并确保走模拟钱包。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:55:54 +08:00
dekun 7ca31b74fb 币本位隐藏 USDT↔USDC 兑换,持仓区与设置仅保留划转。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:45:11 +08:00
dekun 6f721d1e6d 模拟盘对齐币本位:钱包支持 ETH/BTC,现货桥与期权权利金走本地撮合。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:16:51 +08:00
dekun c8688a11ae 对齐币本位期权:现货缓冲开仓、页头 ETH/BTC 余额与默认 coin 模式。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:01:19 +08:00
dekun 7c91d6cad7 Merge close rules into open-rules fold and drop the guide doc link.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 16:17:17 +08:00
dekun 72d8daf15c Show pure-options header trade stats on every navigation page.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 16:13:27 +08:00
dekun 48ea7e1bc7 Keep options internal transfer controls on a single row.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 16:11:46 +08:00
dekun cdbc947838 Move options convert/transfer into the positions card as a collapsed fold.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 16:09:10 +08:00
dekun d0197914ea Add convert and transfer controls below the options order card.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 16:06:36 +08:00
dekun 4ade3be2eb Show options-page price clock and drive header trade stats from pure options.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 15:59:26 +08:00
dekun a1abe159fa Initial standalone crypto_okx with one-click deploy.
Add deploy/manage.sh bootstrap for git.bz121.com/dekun/crypto_okx and point docs at this repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 20:00:59 +08:00