dekun
3577a4d2fd
资金占比分母改为余额加权利金,避免已付权利金被漏计。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-02 16:18: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
193c02eda8
修复中控内嵌:跨站 Cookie 被拦时用 embed_sso 维持登录。
...
SSO 写入 sessionStorage,fetch 自动带 X-Hub-Embed-SSO,避免期权链 API 401。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-01 11:56:51 +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
ed9fd05a84
env 配置为中控 Bridge Token 增加一键复制。
...
便于从客户端直接复制到中控登记实例。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-01 11:18:44 +08:00
dekun
a4a9634ba8
中控 Bridge Token 为空时自动生成,Origin 改为选填说明。
...
打开 env 配置或首次部署即可写入 Token,便于复制到中控登记。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-01 11:16:20 +08:00
dekun
5806fe2f53
系统设置 env 配置增加中控 Bridge Token,便于复制到中控登记。
...
Token 改为明文可编辑并热更新,同步放开 HUB_EMBED_FRAME_ANCESTORS。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-01 11:10:35 +08:00
dekun
c42529e3fd
对接中控:只读持仓快照 API、SSO 打开链与 iframe 祖先配置。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-10-01 10:54:05 +08:00
dekun
e7cafd6dbc
关键位现价改与顶栏同源公开行情,前端无价时回退 nav tickers。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:56:40 +08:00
dekun
ee635bcd55
修复关键位现价:模拟盘无密钥时回退 OKX 公开 ticker。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:52:53 +08:00
dekun
43951a701b
关键位监控默认币种改为 BTC/USDT。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:49:40 +08:00
dekun
fad85ae710
关键位监控币种改为仅 BTC/USDT、ETH/USDT 下拉,对齐期权标的。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:49:07 +08:00
dekun
23ee7ea2e9
清理 env 保存路径中未使用的 import。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:42:28 +08:00
dekun
6f9e6e2a32
env 锁定币本位并清掉对冲/USDC 配置项。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:42:10 +08:00
dekun
2352a5fbdf
env 配置去掉期权/对冲模式与对冲计划区块,仅保留单独期权。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:38:03 +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
56df9a596f
从导航显示与顶栏去掉「对冲计划」开关与入口。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 23:28:01 +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 >
backup-before-remove-hedge-20260930
2026-09-30 22:01:41 +08:00
dekun
41c85c36a9
澄清翻倍出场文案:按当前倍数显示需回收公式,避免误读成按1倍算。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 21:59:25 +08:00
dekun
06f9b23f44
修复翻倍出场达标却不自动平:对冲异常不再整段跳过,并按买一价×全仓判定。
...
原先对冲表异常会直接 return 0 导致翻倍出场永不执行;可回收改为买一价×全部张数,买一深度不足时仍会触发分批平仓。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-30 21:54:00 +08:00
dekun
a03c208a5f
修复模拟盘期权历史分批平仓盈亏:用卖平成交重算已平记录。
...
加载历史前按 sim_option_orders(或钱包流水)合计各批收回,纠正只记最后一笔的旧数据。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-24 21:25:31 +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
c5cfbb34e4
README 增加新机纯实盘部署文档入口。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-15 12:28:31 +08:00
dekun
ea58a4778e
新增新机纯实盘部署文档,并与部署/使用说明互相链接。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-15 12:28:16 +08:00
dekun
d16821c7b7
模拟盘无 API Key 时复盘K线改为优先走 OKX 公开行情接口。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-15 12:16:06 +08:00
dekun
d6bb99b5bb
移植期权复盘自动K线、时区修复与保存后轮询展示,与今日 crypto_monitor 改动对齐。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
snapshot/20260915-options-review-kline-ported
2026-09-15 11:51:41 +08:00
dekun
45c7e73db5
Hide coin/USDC options env fields by margin mode.
...
Also toggle close-gate and compound subfields so the settings page only shows relevant controls.
Co-authored-by: Cursor <cursoragent@cursor.com >
snapshot/20260915-pre-options-review-kline-port
2026-08-25 09:36:13 +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
0cb2167770
Set ultrawide fish-eye container width to 1920px.
...
Widen centered layout on 21:9 displays from 1600 to 1920 while keeping normal screens unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com >
snapshot-2026-08-23
2026-08-23 08:35:17 +08:00
dekun
81654c8dd8
Fix ultrawide 1600px cap when Windows display scaling shrinks viewport.
...
Trigger on 21:9 aspect ratio only, without min-width 1601, so scaled fish-eye monitors still get 1600px container.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-23 08:32:09 +08:00
dekun
625eabb15c
Cap ultrawide layout at 1600px centered using 21:9 aspect ratio.
...
Apply fixed container width only on fish-eye monitors; bump instance_page.css cache version.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-23 08:27:32 +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
d1e6d841c9
Hide contract env/UI: keep options+OO hedge and RS key alerts only.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-21 17:54:49 +08:00
dekun
28c29a0ac7
Treat empty numeric env values as defaults so env UI blanks cannot crash startup.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-21 17:34:39 +08:00
dekun
fc24114142
币本位数据统计改为U展示,已平盈亏按指数折U与浮盈口径一致。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-21 06:46:11 +08:00
dekun
d60c6ad710
登录态改为同一设备 7 天内免重新登录(permanent cookie,访问滑动续期)。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 22:23:51 +08:00
dekun
40c92fb3a6
恢复买一平仓确认框;卖回ETH仍自动执行、不二次确认。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 22:13:55 +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
4eef0d9fd6
修复价格快照接口 NameError:补全 order_prices 初始化。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 18:13:01 +08:00