Commit Graph

29 Commits

Author SHA1 Message Date
dekun 11a083470d fix卖回VWAP必须落库并覆盖指数占位价,禁止预算反推开仓价。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 11:55:42 +08:00
dekun dd979d9dd0 fix真盈亏只认历史币盈亏不再另扣费,刷新按固定量价重算;修模拟到期币盈亏。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 11:30:07 +08:00
dekun 78f18e731a fix模拟盘期权手续费按OKX币本位公式计费,并纠正复盘旧单展示。
费率作用在标的币数量上并以权利金7%封顶,不再误用权利金×费率。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-13 09:37:14 +08:00
dekun e0e2a94322 revert期权历史仍按币展示盈亏,U 口径只用于统计结算。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 23:58:02 +08:00
dekun 70ebfb10e8 fix模拟盘盈亏:收回×卖回价 − 开仓U权利金 − 手续费,历史按U展示。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 23:56:23 +08:00
dekun 5e8b578f75 统计已实现盈亏扣手续费,并按平仓时指数冻结为 U。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 22:50:21 +08:00
dekun c021c38e2d 删除永续下单监控与划转强平,保留关键位监控并完成回归审计。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 13:04:21 +08:00
dekun 77fe0fa679 修复期权币本位高危缺陷:开仓估量、卖回封顶、握库超时与条件单嵌套锁。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 12:00:08 +08:00
dekun ea3e029eb9 修复粉尘桥拦开仓,并继续消除模拟盘嵌套握锁导致的 database is locked。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 11:28:29 +08:00
dekun 030b237981 粉尘低于现货最小可卖量时忽略且不展示、不再重试卖回。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 11:16:13 +08:00
dekun 80ef5ceccb 修复模拟盘卖币握锁导致 database is locked 与中控超时离线。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 11:04:06 +08:00
dekun 265317672c 修复币本位平仓/到期后未自动卖回,并消除模拟盘卖币时数据库锁定。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 10:47:25 +08:00
dekun 95e713e9e6 修复期权到期结算漏推企业微信:页面同步与模拟盘结算一并通知。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 16:08:49 +08:00
dekun 131bb36930 修复实盘顶栏误显示模拟盘会话资金:无交易所余额时显示 —,切模式清缓存。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-04 09:16:45 +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 a03c208a5f 修复模拟盘期权历史分批平仓盈亏:用卖平成交重算已平记录。
加载历史前按 sim_option_orders(或钱包流水)合计各批收回,纠正只记最后一笔的旧数据。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 21:25:31 +08:00
dekun d16821c7b7 模拟盘无 API Key 时复盘K线改为优先走 OKX 公开行情接口。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 12:16:06 +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 e1c2e5889f 修复期权历史/复盘金额为0:模拟盘合成历史、币本位按ETH精度展示,复盘折算为U。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 21:51:01 +08:00
dekun 1bb7f9b0ba 模拟盘买币改用公开行情,避免无效 OKX Key 导致 50111。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:05:10 +08:00
dekun 6f721d1e6d 模拟盘对齐币本位:钱包支持 ETH/BTC,现货桥与期权权利金走本地撮合。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:16:51 +08:00
dekun 9effca9f05 Add sim option expiry settlement so expired positions clear from current holdings.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 15:39:39 +08:00
dekun b9544e53ee Enrich sim option positions with public index and mark prices.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 21:04:00 +08:00
dekun fed51035de Fix sim pending-orders wrapper to accept positional inst_id.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 19:23:33 +08:00
dekun ad992ee262 Use trading account and USDC/USDT market price for sim convert.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 18:52:38 +08:00
dekun 9d1495658c Route sim transfer and convert through local wallets instead of OKX private API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 18:47:41 +08:00
dekun e7aa724a3b Show okx_sim/okx_live and gate live API fields by matching mode.
In sim, hide LIVE/API keys and expose simulated fund settings in env UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 18:35:08 +08:00
dekun 919ac70bc2 Expose sim/live matching mode in env config UI.
Saving SIM_DEFAULT_MODE also switches runtime trading.mode immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 18:14:17 +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