Load only per-tab data for embed fragments, skip exchange capital fetches on tab switches, and harden calculator market imports/timeouts.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace full-page soft nav with a persistent shell and /api/embed/page loads so tab switches in the hub iframe avoid document.write flicker.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove hover prefetch and mark soft-nav fetches so Gate/OKX render pages from local DB without blocking on exchange history sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use fetch in-frame navigation with overlay and hover prefetch; show delayed hub loading spinner instead of hiding the iframe.
Co-authored-by: Cursor <cursoragent@cursor.com>
Load enabled instances from settings, fetch market info via /api/hub/market, and apply exchange-specific amount and price precision in trend and roll calculators.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge 关键阻力位/关键支撑位 into 关键支撑阻力, share key_monitor_form.js across hub and new-tab views, and add hub shortcut to /key_monitor.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clamp future last_close anchors, cap remaining time server-side, prefer freeze_remaining_sec in the badge JS, and auto-repair stale DB rows on read.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow 1h reduction for any active 4h-tier cooloff, hook trade record review updates, and fix freeze label thresholds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync review-mode checkbox with disabled state after form restore; repair initHubEmbedInFrameNav regression in instance_theme.js.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use soft in-frame navigation and loading overlay in hub instance shell; pass embed=1 for iframe SSO opens.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove username_hint from hub auth status API and disable autocomplete on hub and instance login forms.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove external-close risk hooks; register user_instance, user_hub, and user_trend_stop via hub API and trend stop; update docs and tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Implements shared account_risk_lib with 4h/1h cooloff and daily freeze rules, wires hooks into all four exchange apps and hub monitor UI, with tests and docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
manual_order_rr_preview.js was not routed from repo static/, so hide logic never ran. Add Flask routes on four exchanges, default hidden in HTML, and toggleSltpMode visibility.
Co-authored-by: Cursor <cursoragent@cursor.com>
False external-close sync could match historical closing trades before opened_at, producing stop-loss results with closed_at earlier than opened_at. Only use fills at or after open time.
Co-authored-by: Cursor <cursoragent@cursor.com>
Trade tab uses refreshPriceSnapshotConditional, not refreshPriceSnapshot; render recover banner there and on server when live exchange position lacks active monitor.
Co-authored-by: Cursor <cursoragent@cursor.com>
Detect exchange positions without active order_monitors, show a recover banner on the trade page, and reactivate stopped monitors with optional TP/SL restore via API.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add startup grace and consecutive flat polls before external-close reconcile, matching Gate, to avoid stopping monitors and canceling TP/SL when positions API is not ready after restart.
Co-authored-by: Cursor <cursoragent@cursor.com>
Only price and percentage modes show estimated profit-loss ratio before open; fixed RR mode keeps the existing estimated take-profit display.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add shared manual_order_rr_preview.js to fetch order_defaults after symbol and TP/SL inputs complete, display estimated profit-loss ratio before submit in price and percentage modes (and fixed RR), unified for risk and full-margin sizing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sort inner-archive daily trades by closed_at_ms; add open time and live hold duration to instance and hub position cards, with exchange margin on hub footer.
Co-authored-by: Cursor <cursoragent@cursor.com>
Move timed-close badge next to contract name on hub board and instance position cards; refresh countdown on board render.
Co-authored-by: Cursor <cursoragent@cursor.com>
Force exchange_key on archive sync; add contract column and tag select styles on inner-light-mind; serve time_close_ui.js on instances so order/key time-close duration can be selected.
Co-authored-by: Cursor <cursoragent@cursor.com>
Program monitors open positions and market-closes at deadline; UI shows label and countdown on instance and hub boards.
Co-authored-by: Cursor <cursoragent@cursor.com>
False breakout used box/convergence volume/break gates in the UI; now shows pending limit order status like fib monitors.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the pipe-separated rule blurb with a detailed five-column table driven by .env-backed gate parameters for easier trading reference.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync order monitors from Gate position history after hub flat close. Store and display initial_stop_loss in trade records instead of post-amend exchange stops.
Co-authored-by: Cursor <cursoragent@cursor.com>