dekun
8d37b2cba3
Compact hedge-plan option list to 5 rows with overflow select.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 12:33:30 +08:00
dekun
09cd680e4a
Improve hedge-plan option board: moneyness, px/sz, accounts, and denser UI.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 12:27:09 +08:00
dekun
4df2cb4253
Switch hedge-plan modes to high-contrast tabs with history/stats placeholders.
...
EOF
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-14 11:29:50 +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
1bda78ceb2
Fix env save-and-restart by deferring PM2 restart until after HTTP response.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-13 10:54:48 +08:00
dekun
c4753ffb89
Fix swap-all balance by reading OKX funding via asset/balances API.
...
Swap-all targets funding account but ccxt free was often empty; fall back to trading USDT for unified accounts and show balances in errors.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-13 09:01:37 +08:00
dekun
c4bac23c48
Parse OKX spot swap errors into friendly Chinese instead of raw JSON.
...
Map sCode 51008 to a clear insufficient-balance message for the currency exchange UI.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-13 08:54:53 +08:00
dekun
44657e0484
Add confirm dialogs and busy states for swap/transfer all actions.
...
Use available (free) balances for full-amount ops, support sub-account scope, and show clear success/failure feedback.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-12 09:10:29 +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
bb53beb22d
Hide zero USDT in options balance labels and add swap/transfer all buttons.
...
Skip 0 balances in header display; fill max funding/trading amount on 全部兑换/全部划转.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-12 08:55:30 +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
04fd84757c
Improve light theme contrast on options positions panel.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 15:09:02 +08:00
dekun
6f6545ce52
Add T-shaped options chain view with straddle metrics (phase A).
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 15:00:50 +08:00
dekun
c9c8388250
Improve options order estimates and chain filter defaults.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 14:37:53 +08:00
dekun
9f0a30a040
Add hub usage help page with settings nav toggle.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 10:02:07 +08:00
dekun
843d87422d
Show hub fullscreen options positions as cards matching instance data.
...
Enrich hub options snapshot with close preview and render read-only option position cards in exchange fullscreen view.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:40:35 +08:00
dekun
baf94b4feb
Compute option stats from exchange history instead of local DB.
...
Share history loading between history and stats APIs so average profit/loss matches the option history tab.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:34:49 +08:00
dekun
68733eb4f9
Show average profit and loss in option stats panel.
...
Expose avg_win and avg_loss from stats API and update chart labels and values to match the average-based P/L ratio.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:29:26 +08:00
dekun
bf2d668d3c
Fix option history to full closes only, 2-decimal USDC, restore hide-delete.
...
Filter OKX positions-history to type 2/3/6, format premium and bid recovery to 2 decimals, and allow locally hiding rows via delete button.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:24:24 +08:00
dekun
fdea5bb610
Align option display precision with OKX and use exchange position history.
...
Format prices by tickSz, move bid depth/recovery to card end with plain styling, and load option history from OKX positions-history instead of local DB.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:14:43 +08:00
dekun
1b31c61aac
Simplify option close depth display.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 09:04:17 +08:00
dekun
e8a55a0f85
Polish option close depth display.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 08:57:19 +08:00
dekun
6e45604d93
Add depth-based option close flow.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-11 08:46:07 +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
edfe935fb4
Register instance_stats.js static route so period tabs work on all exchanges.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 14:02:24 +08:00
dekun
c97cc2823c
Fix corrupted embed stats fragment causing 500 and broken period tabs.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 13:57:09 +08:00
dekun
40dbafe851
Fix instance stats week/month tabs not responding after embed preload.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 13:50:25 +08:00
dekun
6aaa328a24
Add tabbed period stats with lightweight charts on instance pages.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 13:27:02 +08:00
dekun
0ce14c8822
Add missing last_alert_message column migration for key_monitors.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 12:54:07 +08:00
dekun
dbd8764b0d
Fix light-mode system logs readability and add calendar day card frames.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 12:42:51 +08:00
dekun
944673cac1
Improve hub and instance navigation contrast for light and dark themes.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 12:33:54 +08:00
dekun
d1ab2d5172
Add options stats holding time metrics and lightweight charts.
...
Show average hold duration for wins and losses, open positions, and CSS ring/bar visualizations in the stats tab.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 11:32:45 +08:00
dekun
9f255f13dd
Add ITM and OTM filter toggles to options chain.
...
Default to in-the-money view with at-the-money contracts included; update expiry counts and empty states for the active filter.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 11:25:24 +08:00
dekun
b70ce510ef
Add tabbed layout for options positions card.
...
Split current positions, stats, and history into tabs to save vertical space and improve readability.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-10 11:19:33 +08:00
dekun
b6d116ec7a
Fix options positions API 500 from sync throttle UnboundLocalError.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 18:19:45 +08:00
dekun
f99900ac40
Fix intermittent loss of options positions and realtime PnL on refresh.
...
Use stale-while-revalidate for positions API and UI, throttle sync calls, and avoid overwriting displayed PnL with null on transient failures.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 18:09:58 +08:00
dekun
5a97e14f3e
Fix false options close sync, restore bar layout, and show open premium in history.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 17:51:07 +08:00
dekun
08a61fd4ae
Tighten options position bar grouping and compact history table status layout.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 17:43:24 +08:00
dekun
af7a397816
Fix options position bar layout so Put badge and contract id display on one line.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 17:37:24 +08:00
dekun
3d11b91869
Expand options position card inline below the clicked bar.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 17:06:22 +08:00
dekun
ff83f6eebc
Refine options position accordion: default collapsed, 2dp PnL, card outside scroll.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 17:00:06 +08:00
dekun
f41af0bf1c
Improve OKX options sizing, expiry sync, and multi-position accordion UI.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 16:51:48 +08:00
dekun
d092f213a7
Fix hub system logs by resolving PM2 log paths from jlist and glob fallback.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 10:38:24 +08:00
dekun
5214794f95
Add hub system logs page with PM2 stdout/stderr tabs for all exchanges.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 10:33:14 +08:00
dekun
9eb10ba771
Align risk policy cards per row with equal-height stretch in 2x2 grid.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 10:21:25 +08:00
dekun
db8a9296a7
Fix risk policy layout to 2x2 grid with content-based card heights.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 10:17:15 +08:00
dekun
f4361e3eeb
Make risk policy cards responsive with auto-fit grid layout.
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-07-09 10:09:49 +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