Commit Graph

778 Commits

Author SHA1 Message Date
dekun edcc04e88c Improve options review tabs and multi-timeframe uploads.
Add source-type tabs, open an inline journal form from list rows, and match contract-style 5m/15m/1h/4h screenshot slots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:45:44 +08:00
dekun 10128d18bc Add OKX options review module with hedge plan entries.
Import closed OKX option history and closed hedge plans into one list for journaling, images, and stats without mixing contract reviews.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 09:35:19 +08:00
dekun eb5c6a658b Show hedge targets in control center
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:29:45 +08:00
dekun 8f71dbe874 Show hedge targets in options monitoring
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:15:00 +08:00
dekun 6e6cb7caac Add active hedge plan tab
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 07:04:51 +08:00
dekun e280220951 Move desktop calculator tabs left.
Compress wide-screen calculator inputs into three rows while preserving mobile layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:50:42 +08:00
dekun c9d40e5e52 Add desktop calculator tabs.
Show one strategy calculator at a time while preserving the existing mobile tab experience.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:44:36 +08:00
dekun b30129f83f Remove duplicate funds PnL banner.
Keep cumulative PnL in summary cards and free toolbar space after snapshot sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:36:37 +08:00
dekun 4e86595f2a Collapse daily stats by default.
Show only total floating PnL until expanded; enlarge details and lower exchange headers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:31:00 +08:00
dekun 35b23836e3 Restore strategy chips and 1080p side margins.
Stick expand hint to card bottom; drop mistaken key-monitor slot; keep ultrawide content width.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:11:29 +08:00
dekun 0540b585c7 Refine monitor 2x2 slots and drop tablet CSS.
Add options target column, reserve pos/monitor rows, equal columns, and remove hub-tablet densify path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 14:03:59 +08:00
dekun 018b4d5601 Split OKX monitor into perp and options cards.
Align four exchange cards in a 2x2 grid so 1080p layout stays balanced.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:47:21 +08:00
dekun bde8c517e0 Tighten empty monitor cards on 1080p.
Size no-position blocks to content and give remaining height to options/positions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:42:26 +08:00
dekun 480f6d78e8 Fix desktop blur from false tablet layout.
Stop classifying short desktop viewports as tablets so densify fonts do not apply.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:35:41 +08:00
dekun 57dad1ffdf Fit tablet hub to one screen with denser type.
Keep full card content readable; shrink fonts/spacing and use in-table scroll only when positions overflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:22:57 +08:00
dekun 7d6f0ac55b Fix tablet hub cards clipping content.
Prefer visible card content over forced one-screen crop; auto row heights and page scroll on hub-tablet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:13:17 +08:00
dekun 2777419a10 Add tablet viewport fit for hub one-screen layout.
Hi-DPI tablets like 2560x1600 map to ~1280x800 CSS; broaden fit breakpoints and densify for hub-tablet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:09:29 +08:00
dekun 836b37cc7e Fit hub monitor, market, and funds to one 1080p screen.
Constrain desktop shell to 100dvh with flex fill so OKX perp+option plus peer cards, chart, and equity overview avoid page scroll.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 13:01:17 +08:00
dekun 4686cf049a Require real ask depth for options and hedge opens.
Block mark-as-ask opens, show reference mark when no depth, cap sheets to ask size; leave close paths unchanged. Document in docs/更新文档.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:48:53 +08:00
dekun 195eeae295 Fix options select UI and false contract-missing quotes.
Keep the order host out of tbody wipes, sync pick-button labels, and retry/fallback OKX meta under rate limits so live contracts are not reported as missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:18:41 +08:00
dekun 1f767f16e4 Fix Gate key_focus 500 from invalid Jinja startswith filter.
Use (value|upper).startswith(...) so symbol whitelist select works when default is BTC/USDT.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:12:48 +08:00
dekun b057122d71 Fix options order panel vanishing after select.
Park the panel before strike-table rebuilds so soft chain refresh no longer destroys #opt-order-panel with innerHTML.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:10:45 +08:00
dekun 95e46ab803 Restyle options target-monitor banner for light mode.
Use a light panel with dark text instead of keeping the dark-theme black bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:06:01 +08:00
dekun 12c4e55f24 Fix intermittent empty options expiry dropdown after coin select.
Retry instrument fetch, reject empty chains instead of caching them, and ignore stale loadChain races.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:04:08 +08:00
dekun b50eebe37c Boost light-mode contrast on options position cards.
Darken labels, hints, and badges so call/put chips and metric text stay readable on white.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:00:30 +08:00
dekun 4c7197ad99 Fix options chain headers mixing list and T-view columns.
Thead rows used a .hidden class with no CSS rule on instance pages, so both header sets stayed visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 11:57:07 +08:00
dekun f0d5b47f50 Fix options add-on premium to sum all open legs for the contract.
Display, close gate, alerts, and full-close accounting no longer use only the latest fill row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 11:11:32 +08:00
dekun 4a0b0def1d Center instance login form by fixing broken theme-bar layout.
Move the theme toggle inside body and stack it above the form so flex no longer pushes the card to the right.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 08:49:23 +08:00
dekun 19a4a5194d Use per-exchange PWA names and logos for instance app installs.
Show Binance/OKX/Gate 交易系统 with distinct exchange icons in manifests, apple titles, and login branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 08:44:07 +08:00
dekun 717a3d5694 Add cumulative P&L banner to fund overview for at-a-glance profit/loss.
Expose period delta from equity curve start and surface it in the toolbar and summary cards with green/red cues.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 00:19:43 +08:00
dekun 83a7465996 Remove default login credentials from hub login UI.
Stop showing admin/admin123 on the login page and clear the hardcoded username placeholder in settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:59:14 +08:00
dekun 8838f1f221 Phone hub folds: emergency ops, market toolbar, calc tabs, OKX options.
Collapse bulky monitor/market controls by default on phone, show OKX options on tiles, add calculator tab switch, and request landscape on market fullscreen.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:56:02 +08:00
dekun f16dcac202 Tighten phone hub layout: single-column monitor and chart-first market.
Hide duplicate page titles on phone, compact toolbars, and denser calculator forms without changing desktop/tablet shells.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:47:09 +08:00
dekun bfb5e22be9 Add phone-only hub shell with four bottom tabs.
Keep desktop/tablet top nav unchanged; at max-width 720px use monitor/market/calculator/AI plus a More sheet for secondary pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:40:50 +08:00
dekun 0939274113 Fix roll docs page by resolving markdown from repo root.
The /strategy/roll/docs link looked under lib/strategy/ while 顺势加仓滚仓说明.md lives at the repository root.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:29:14 +08:00
dekun a21b962bf1 Fix options mark price float junk and target index input rollback.
Skip full card redraw while the monitor target field is focused, and format mark/avg without relying on dusty server strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:24:52 +08:00
dekun 6f934ecbbf Clarify 2x recycle is a target-close gate, not auto-close.
Rename UI copy from auto-close to target gate so 2x alone is not read as a close trigger.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:16:06 +08:00
dekun cbb7f954f5 Auto-cancel stale option close limits after pending TTL.
Default 10m via OKX_OPTIONS_PENDING_TTL_SECONDS; show age/countdown in pending panel; monitor loop cancels sell closes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 22:06:24 +08:00
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 60f3437c73 Rename options close wording to bid1 in hub help.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:55:07 +08:00
dekun 1909eea654 Use bid1-only option closes with hard-disabled market exits.
Manual close checks liquidity only; target auto still requires 2x recycle hold once, then reuses the shared bid1 executor. Add /options/guide doc and update hedge-plan refs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:49:06 +08:00
dekun ab8b2a74e2 Show cancellable pending option orders beside the order form.
Fetch live OKX option hangs on the right after submit, with refresh and one-click cancel.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:22:29 +08:00
dekun c2a0cea3f4 Gate option closes behind 2x recycle sustained for 2 minutes.
Require bid-side recoverable premium at least 2x cost continuously before target auto-close or depth close can fire.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:13:43 +08:00
dekun c025c06fac Block option auto-close on stub bids far below mark.
Reject target and depth closes when bid is a residual tick, and show invalid-bid UI instead of recycling at junk prices.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 21:05:54 +08:00
dekun e15eca76f3 Show option net P/L from bid recycle minus premium.
Rename floating P/L to net P/L, align ROI, and display bid depth as price/liquidity for only the levels needed to close.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 20:54:15 +08:00
dekun da3975e42e Fix BTC option prices losing trailing zeros in display.
Integer tick formatting was stripping zeros (1370 -> 137), so hedge-plan quotes looked wrong versus the options list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 17:12:33 +08:00
dekun 142b6de0f6 Stop repeat WeChat alerts on option target closes.
Commit monitor status before notify, and use a closing state so unfilled limits retry silently instead of re-alerting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 16:45:43 +08:00
dekun ec30a3999c Fix exchange display names polluted by shared PM2 env.
Require EXCHANGE_DISPLAY_NAME in each instance .env.example and restart with --update-env so Binance/Gate no longer inherit OKX.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 16:30:44 +08:00
dekun 944a211e4a Keep draft target input across position refresh until set.
Polling was re-rendering cards and wiping the field before 设定; drafts and focus are now restored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 16:10:09 +08:00
dekun 0bedb2e972 Clear target input after set and show estimated value/profit.
Position委托 row keeps the field empty for new entry and displays target value plus estimated PnL after arming.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 16:05:54 +08:00