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
70f6cc2e7b
单测同步币本位张数手续费缓冲
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 13:25:05 +08:00
dekun
73efad6fa5
币本位顶栏去掉期权资金/交易列,交易账户显示USDT/ETH/BTC
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 12:58:43 +08:00
dekun
a84554e613
币本位顶栏资金显示USDT+ETH,单笔期权本位改为下拉选择
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 12:38:39 +08:00
dekun
72c84bb993
实现OKX单笔期权币本位与USDT桥复利(中控只读,不改Gate)
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-20 12:10:29 +08:00
dekun
71a91484a3
白名单仅一币时选择币种默认显示 env 币种(关键位/实盘下单共用)。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 19:27:05 +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
9c19afc8d4
修正期权开仓 51008 文案:不再误报资金账户 USDT,按 USDC/USDT 区分提示。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 16:08:16 +08:00
dekun
cd23ea74a6
单独期权增加翻倍出场:可开关、自选倍数(默认1倍=盈利等于权利金),达标后买一限价平。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 10:31:29 +08:00
dekun
1522117eeb
单独期权增加全仓复利模式:可选上限开关,仅允许一仓
...
用期权户全部可用×缓冲开仓,默认不设上限;开启上限后按 env 封顶,全仓时禁止已有持仓再开。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 09:45:36 +08:00
dekun
38e3e00fe9
情景测算按到期实值反推盈亏比达标现货价
...
达标情景现货价按权利金价值与行权价反推,便于对照到期后效果。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-11 17:01:21 +08:00
dekun
a1bf760a28
修正期期盈亏比口径:按总权利金计算,残值按本合约
...
盈利腿触发改为盈利金额/总权利金;亏损腿残值20%仍相对该合约自身权利金。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-11 16:51:50 +08:00
dekun
c5d3d9d6c1
期期出场改盈亏比:达目标平盈利腿,亏损腿残值20%或到期平
...
将上/下破目标价替换为盈亏比(盈利金额/初始权利金,默认2);残值平需买一流动性且权利金≤初始20%。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-11 16:44:45 +08:00
dekun
245b85ad27
feat(instance): add exchange account ledger tab with SSE sync
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-10 09:51:45 +08:00
dekun
eca6d091e9
feat(hedge): option-primary watch entry with leverage gate
...
Start strategy arms a watching plan instead of opening immediately; list filters by leverage; type is a dropdown defaulting to OTM.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-09 09:27:42 +08:00
dekun
e7e733d9a9
fix(hedge): filter options-chain by min hours and strike interval for option-primary
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-09 08:38:11 +08:00
dekun
afe361ce47
feat(hedge): add option-primary mode for perp+options plans
...
Add UI switch for Call+short/Put+long, premium x0.95 sizing, option-first open, and K+/-points exits with fee-aware net PnL.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-09 08:29:26 +08:00
dekun
0b8e5a0914
Fix hub funds overview double-counting OKX USDT with options.
...
Only add options USDC/USDG onto perpetual USDT totals, repair historical double-counted snapshots, and label the options line as USDC.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-07 10:30:34 +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
d41028b766
Fix dashboard PnL using spot contract size of 1.
...
Prefer perpetual symbols and normalize before market.contractSize lookup so Gate BTC float matches ~0.4U not thousands.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-06 14:20:43 +08:00
dekun
75a4175522
Fix instance dashboard order PnL columns showing empty dashes.
...
Compute float_pnl and tp_profit from mark/entry/contracts using each exchange contract size during dashboard enrich.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-06 14:12:57 +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
7f22bffbc6
Shorten force-close window to 5m and grey-out open during blocks.
...
Unify Gate/OKX/Binance: disable the open button with a side note during force-close, cooloff, and daily freeze, and enforce the same gate server-side.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-06 08:38:00 +08:00
dekun
7352d10254
Fix hub total floating PnL by excluding OKX options from swap agent.
...
Option legs were scored with linear swap math and then added again from the options snapshot, inflating 总浮盈亏 and 持有仓位.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-05 22:13:22 +08:00
dekun
3f6e67661b
Lock hedge-plan option selection to ITM/ATM (perp) and ATM/OTM (OO).
...
Server validate on preview/start, UI filters and recommend templates, plus usability/security audit doc.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-05 21:50:35 +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
22e6b68e6d
Add OKX env toggle to show or hide perpetual funds in the header.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-05 17:55:15 +08:00
dekun
a00699aec3
Fix TP/SL exit classification when exchange fill slips past the tight band.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-01 09:38:28 +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
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
d89aff3ad6
Use absolute coin counts in perp-options points mode.
...
Treat 2:4 as 2 perp + 4 option coins instead of normalizing to 1:2, and disable embed page caching so hub iframe picks up trade UI updates.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 22:54:16 +08:00
dekun
9f3395de2f
Add sideways max-loss to perpetual-options calculator.
...
Show premium wipeout plus flat round-trip perp fees as case C for both size and points modes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-29 22:38:20 +08:00
dekun
26bc19f047
Add two-day amplitude window to amp-stats.
...
For each settlement day, also compute H-L over start minus one day through 16:00 (e.g. 25 16:00 to 27 16:00).
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 15:05:38 +08:00
dekun
c81ba147cc
Replace amp-stats straddle/perp overlays with move-points amplitude ratio.
...
Input points now drives amplitude hit share; table keeps both-side moves and amp达标.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:56:48 +08:00
dekun
90be23e845
Fix amp-stats perp PnL to exit at daily profit target.
...
Hit A/B via open-to-high/low; day PnL equals target when touched, otherwise settle at close.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:41:29 +08:00
dekun
2ce67da8e8
Use daily open as perp-hedge entry and toggle buy-straddle vs perp overlays.
...
Amp-stats now prices premium from each day's open, and the form switches mutually between straddle and perpetual-options对照.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:31:17 +08:00
dekun
d049c5d317
Add perpetual-options hedge overlay to amp-stats with hit rates and daily PnL.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 14:20:42 +08:00
dekun
a908dccaba
Add ratio-to-move-points mode for hub perpetual-options calculator.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 12:47:17 +08:00
dekun
4bcf88b5cb
Add hub perpetual-options hedge calculator tab and sizing formula.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-28 12:37:51 +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
890659f173
Add key monitor and live trade toggles to instance nav display prefs.
...
Defaults stay on; users can hide them like other top-bar tabs.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 00:55:31 +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
54f1857fa2
Sync OKX options closed trades into hub archive with a separate tab.
...
Mirror perpetual archive flow into archive_options_trade_cache for offline calendar and review.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-24 00:39:59 +08:00
dekun
ed3033d793
Add hub strategy compare page for perp vs options vs 7:3 hedge.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 14:39:59 +08:00
dekun
910c938d0a
Throttle OKX amp-stats candle pagination and retry on 429.
...
Add page pauses, exponential backoff, and cooldown before swap fallback to avoid rate limits.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:57:24 +08:00
dekun
0a9e3aa95c
Fix amp-stats long-range candles via OKX history endpoints.
...
Recent candles cap near 60d; continue with history-index/history candles and color profit green/red.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-23 02:53:36 +08:00