dekun
ee7be3e7f3
Align options realtime PnL with bid-net and show totals in stats.
...
Header float PnL now uses bid recycle minus premium like position cards. Stats adds realized/open/total net PnL.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-15 22:00:45 +08:00
dekun
1e765f4b2b
Silence Flask access logs and retain PM2 logs for 3 days.
...
Stop werkzeug request spam into PM2 error files, truncate oversized logs, and install daily logrotate with 3-day retention.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-15 07:53:19 +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
5eb9b9f5c5
Force-refresh header balances after transfers and balance SSE events.
...
Invalidate balance caches on mutation, push SSE balance tick, and bypass 60s cache when refreshing funds.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-12 09:03:15 +08:00
dekun
551c86264a
Fix OKX spot swap tgtCcy and show options trading USDT in header.
...
OKX requires quote_ccy/base_ccy for market orders; include trading_usdt in balance display and total funds.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-12 08:42:33 +08:00
dekun
02472f19cb
Fix breakeven badge still showing after roll lowers stop loss.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 16:52:29 +08:00
dekun
23ba725c89
Fix intraday profit amount and hide TP/SL cancel for day trades.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 09:55:09 +08:00
dekun
d3a44b23db
Split journal order type from entry reason and fix review edit toggle in embed shell.
...
Adds order_type to journal uploads, removes legacy swing/trend labels from entry reason options, and ensures review-edit buttons sync when the records tab loads dynamically.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 09:27:03 +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
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
aa966114b1
Fix settings and env config stuck on loading via SSR form render
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 20:24:15 +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
dekun
d84a265b67
Split risk policy into its own navigation tab.
...
Move read-only risk control docs to /risk_policy before settings; keep transfers and exports on the settings page.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 19:42:29 +08:00
dekun
e3e53ff7f5
Fix roll position display: live contracts, TP profit, and 2-decimal qty precision.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 17:06:33 +08:00
dekun
f5f302b97e
Add month/quarter/half-year/all list window presets with this month as default.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 11:22:29 +08:00
dekun
189b27e076
Add live expiry countdown for options positions on instance page and trading hub.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 11:14:30 +08:00
dekun
f68197b775
Include options unrealized PnL in OKX instance header realtime PnL total.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-08 11:05:52 +08:00
dekun
6cc3382526
Hub monitor: read-only OKX options positions aggregation (Phase B).
...
Expose /api/hub/options/snapshot from OKX instance and render options summary on hub monitor cards when the options capability is enabled.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 12:55:35 +08:00
dekun
2ad9e049f3
fix(okx): cache options balances and stop SSE from hammering exchange API
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 11:15:06 +08:00
dekun
799a4d6b8b
fix: enable threaded Flask for SSE and make embed tab switch instant
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 11:09:34 +08:00
dekun
30e40dc34c
perf: embed shell soft nav, tab cache, and lighter options page boot
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 10:42:01 +08:00
dekun
75aa4b1391
feat: single-row funds strip on header and system settings page
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 10:09:51 +08:00
dekun
e82fd15bb7
feat: options UI scroll layout, stats card, funding balance, and cross-account transfer
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 09:57:13 +08:00
dekun
090b9c6215
feat: restructure OKX options UI with header funds, settings card, and dual-column layout
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 09:36:00 +08:00
dekun
ae0c44e20d
fix: always show OKX options nav tab and allow options page without redirect
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 08:33:23 +08:00
dekun
806bb074ab
feat: add OKX options module with dual API, USDT/USDC convert, and docs
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 08:17:27 +08:00
dekun
814fe67a21
feat: expand header stats with total funds and profit-loss ratio
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 02:14:18 +08:00
dekun
659c0969fe
fix: show header realtime PnL from exchange positions and order metrics
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 02:04:40 +08:00
dekun
6547029a89
feat: compact instance toolbar, stats strip and settings two-column layout
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 01:37:19 +08:00
dekun
d87081205d
feat: instance system settings page with risk docs, export and transfer
...
顶栏新增系统设置;风控说明读取 .env;数据导出与资金划转迁入三张卡片;顶栏移除导出条与手动划转。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 01:26:38 +08:00
dekun
2a3d264c8f
fix: allow force-close in trade review and hide strategy nav for intraday
...
统计核对结果允许强制清仓;日内户顶栏隐藏策略交易与策略交易记录。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 01:01:57 +08:00
dekun
5a0d18cf99
feat: add force-close exit trigger and round journal real RR to 2dp
...
复盘离场触发增加强制清仓;填入复盘与自动计算实际盈亏比保留两位小数。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 00:40:55 +08:00
dekun
1092816359
feat: review entry reason picker uses dropdown instead of prompt
...
Add modal select for trade record review, expand options to two-level labels (反转/启动A), and accept legacy short labels on save.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 00:38:16 +08:00
dekun
f580e4542d
feat: show entry type as category/subtype (反转/启动A)
...
Format持仓与交易记录开仓类型为两级展示;新平仓写入与旧短标签自动展开。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 00:27:53 +08:00
dekun
99eb16dbd8
fix: Gate force-close badge and classify midnight closes correctly
...
Narrow executing window to 15 minutes after the hour, show countdown when flat, run force_close before reconcile, and map 00:00 synced closes to 强制清仓 instead of 手动平仓.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 00:23:40 +08:00
dekun
d520ba6904
fix: OKX manual orders save entry_model for trade record 开仓类型
...
OKX add_order omitted entry_model on insert; align with Binance/Gate and add trade_style fallback when resolving entry_reason for close and display.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-07 00:15:22 +08:00
dekun
d4a76f05d2
Fix Gate mark/PnL/TP-SL snapshot and intraday order UI
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 22:04:19 +08:00
dekun
8b069294b7
refactor: unify three-exchange instance UI with shared templates
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 02:43:24 +08:00
dekun
4904a86e03
fix: hide hub close/entrust controls for intraday discipline profile
...
Expose intraday_discipline via hub meta and block manual close/tpsl APIs; Gate instance card no longer shows 全平/平仓/委托.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 02:26:22 +08:00
dekun
a268a93027
feat: show force-close badge and countdown when FORCE_CLOSE is enabled
...
Add shared lib/UI for midnight force-close indicator on instance and hub pages, and document Gate intraday 0-point exit alignment.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 02:17:47 +08:00
dekun
fa9e6be36d
feat: show entry type in trade records, remove journal custom entry reason
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 00:49:21 +08:00
dekun
ea429b2694
feat: 趋势户开仓类型大分歧A/B/小分歧,自动联动趋势波段与复盘
...
下单监控增加 entry_model 下拉;平仓写入短标签并预填复盘。Binance/OKX 用趋势 profile,Gate 日内仍用手选 trade_style。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-06 00:18:38 +08:00
dekun
21894334f8
feat: KEY_AUTO_ORDER_ENABLED 三所统一开关,联动关键位自动单与开仓类型
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-05 23:39:06 +08:00
dekun
f688a504e1
ui: 复盘表单紧凑布局、即时上传截图并移除占用时新开仓
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-05 22:46:05 +08:00
dekun
7bb6ee1154
remove: 全面移除「错过机会」功能与文案
...
删除手动记录表单与 /add_miss;停止自动生成错过类交易记录;列表/统计/顶栏不再展示;复盘卡片改为整行。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-05 22:21:30 +08:00
dekun
88fe4bbe56
feat: 复盘四周期手动上传,移除 AI 识别预填
...
固定 5m/15m/1h/4h 四槽截图上传与详情四宫格展示;自动 K 线默认关闭且与手动上传互斥。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-05 21:57:41 +08:00
dekun
c0ad50a7b5
feat: 账户方向与币种白名单 env 开关(三所)
...
Per-instance TRADE_DIRECTION / TRADE_SYMBOL_WHITELIST restricts UI and API for manual orders, key monitors, and strategies; includes sync script for deployment profiles.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-05 00:30:49 +08:00
dekun
eb975b0133
fix: 交易安全审计修复 — 补偿平仓、中控同步、滚仓/趋势防护
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-04 22:44:16 +08:00