dekun
75f50fe083
交易所 API 改为仅服务器配置:前端去掉密钥、新机示例为空,并防止坏钥反复请求触发 Gate 封 IP。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 12:21:43 +08:00
dekun
081afeba76
币本位 env 隐藏门控 USDC 倍数项,USDC 模式隐藏币本位倍数
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 09:29:46 +08:00
dekun
e38039d99a
目标门控模式改为下拉:权利金×倍数 / 净盈亏阈值
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 09:07:10 +08:00
dekun
c1a84013b9
目标门控 env 默认值写入 example 与 UI,避免前端输入框空白
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 09:06:23 +08:00
dekun
fe346571b1
目标平仓门控改为 USDT 口径:env 可配权利金倍数与净盈亏阈值,币本位默认×1.05
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-25 09:01:06 +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
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
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
886b6dcc5b
修复全仓复利开启时单笔预算仍显示:flex 覆盖了 hidden,改为强制隐藏。
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-12 10:16:47 +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
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
20e0c2cb9f
refactor(hedge): env-driven option-primary UI with grouped params
...
Move mode switch to HEDGE_PLAN_OPTION_PRIMARY, split left into capital/select/exit groups, and show perp quote above options with leverage auto-match.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-08-09 09:05:32 +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
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
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
d870178b83
Show auto-transfer account and currency as selects with defaults.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-26 08:34:02 +08:00
dekun
301a464f29
Add daily loss-count freeze for account risk cooldown.
...
RISK_DAILY_LOSS_LIMIT (default 2, 0 disables) freezes new opens after N losing closes in the trading day.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-21 22:13:38 +08:00
dekun
5b346a5760
Hedge start: re-quote ask and resize OO sheets; add HEDGE_PLAN_BUDGET_BUFFER.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-20 10:09:32 +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
7938628485
Fix 期期 sheets bias: split total 2n from same-sheets, not n.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 15:33:00 +08:00
dekun
e3cd2a75de
Replace 期期 equal-split with long/short bias sizing and env ratio controls.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 15:25:10 +08:00
dekun
eea4d4ff8f
Show auto-close as off when partial manual-complete is enabled.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 09:11:00 +08:00
dekun
d74d0aeae0
Park partial hedge plans for manual leg complete instead of auto-close.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 09:06:22 +08:00
dekun
e11c13747a
Add mutual-exclusion gate between hedge plans and standalone options.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 08:51:46 +08:00
dekun
3119486105
Add 期期 close mode (全平/到期平) with scheme-C env toggle.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 08:06:27 +08:00
dekun
f21e4d1166
Add env toggles to show/hide perp and options hedge plan tabs.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-19 00:43:04 +08:00
dekun
0a14fe73c1
Add key auto-order toggle to instance env config UI.
...
Expose KEY_AUTO_ORDER_ENABLED and KEY_AUTO_MIN_PLANNED_RR under 交易执行 so the frontend matches the settings readout.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-18 15:31:39 +08:00
dekun
aabbbef0a9
Turn position/margin/sizing/direction env fields into dropdown selects.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-17 19:41:47 +08:00
dekun
982497d65a
Enable hedge-plan live opens with path validation, DB, and monitor.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 13:15:10 +08:00
dekun
9e17814e37
Prevent env autofill from overwriting OKX API keys when saving hedge settings.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 11:22:28 +08:00
dekun
1fa98425e7
Add OKX hedge-plan P0: env group, preview page, and PnL scenario math.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 11:00:15 +08:00
dekun
b733e551a0
Normalize fullwidth punctuation to ASCII across codebase.
...
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 23:42:26 +08:00
dekun
aaa72c7961
Fix hub AI save: background PM2 restart after JSON response.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 23:06:31 +08:00
dekun
823aeda42a
Add hub AI config tab with sync to instances and deploy secret bootstrap.
...
Wire bootstrap_deploy_secrets into setup_env.sh (one-time HUB_BRIDGE_TOKEN, FLASK_SECRET_KEY, HUB_SESSION_SECRET). Remove AI section from instance env UI; hub saves OPENAI settings to all four .env files. SSO unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 22:50:58 +08:00
dekun
d339971c26
Fix env config UI to show runtime defaults when keys are missing from .env.
...
Account risk fields now match the risk policy page; uncomment RISK_* defaults in .env.example.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 21:54:47 +08:00
dekun
1ee9eb02c3
Add settings page tabs and show env API keys with last four digits.
...
System settings now use the same CSS tab layout as env config; sensitive env fields display masked values from .env while keeping save-on-empty behavior.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 21:31:14 +08:00
dekun
576f6fbcfc
Redesign env config UI: tabs, 2-col form, remove per-field badges
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 21:10:54 +08:00
dekun
0d2ce9c126
Add curated env config UI with Chinese labels and deploy secret bootstrap
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 21:03:00 +08:00
dekun
68e03ccd97
Fix settings tab 500 and env config grouping in UI
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 20:33:31 +08:00
dekun
ef4b2f17ca
Add instance nav prefs, env config UI, and PM2 restart.
...
P1-P4: configurable nav/section visibility in system settings, full .env editor with restart badges, password change, runtime hot overrides, and single-instance pm2 restart. Works in hub embed iframe.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 20:07:06 +08:00