Use plan margin x leverage x price change with latest K-line close instead of stale board snapshot floating_pnl.
Co-authored-by: Cursor <cursoragent@cursor.com>
Gate hedge position triggers use close=false; stop silent ccxt fallback on cross margin. Hub merges agent and Flask TP/SL by trigger price and labels Gate orders correctly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use order monitor plan prices on handoff cards and fill exchange TP/SL rows when Gate shows reduce-only orders without algo labels.
Co-authored-by: Cursor <cursoragent@cursor.com>
Pass unrealized PnL from monitor jump context, refresh from board snapshot, and let users drag the SL price line to call the same place-tpsl API as the monitor entrust dialog.
Co-authored-by: Cursor <cursoragent@cursor.com>
Share focus_chart templates and APIs across four instances; align chart Y-axis, price lines and meta bar with exchange symbol precision and live unrealized PnL.
Co-authored-by: Cursor <cursoragent@cursor.com>
Proxy /api/hub/trend/stop and breakeven to instances; enable offset input and actions in hub UI. Add horizontal padding on strategy records page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add shared strategy_wechat_notify helpers; hook trend execute/finalize and roll group open/close across four exchanges and Gate bot.
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore plan floating P/L and st-done greens; fix panel-item and stats-split-col in light mode; observe journal lists; bump theme assets to v3.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add docs/ubuntu-server.md; remove Windows and alternate process managers from deployment guides; index strategy, key monitor, TP/SL, breakeven, and replay docs in root README.
Co-authored-by: Cursor <cursoragent@cursor.com>
Left column shows plan metrics, right column DCA table, footer for breakeven and snapshot info; update strategy and exchange usage docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Split trend and roll snapshot lists with expandable rows, client filters, and DB prune to latest 100 entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Persist ended trend pullback and roll group snapshots to a unified records page; show replenishment tiers on instance and hub cards with horizontal single-position layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
Dark cyan-green candlestick icon for hub and four exchanges; generate/sync scripts and docs/shortcut-icon.md.
Co-authored-by: Cursor <cursoragent@cursor.com>
Position and trend plan cards read sizing from trend_pullback_plans; merge agent mark/PnL; compute position_ratio_pct in hub enrich.
Co-authored-by: Cursor <cursoragent@cursor.com>
Position cards show trend plan source, risk%, program TP price and RR; trend section uses plan grid; hub API enriches floating PnL and planned_rr.
Co-authored-by: Cursor <cursoragent@cursor.com>
sync_four_exchange_env runs position sizing + transfer sync; transfer script preserves existing values and supports --set-amount/--enable-auto-transfer.
Co-authored-by: Cursor <cursoragent@cursor.com>
Rebalance swap to AUTO_TRANSFER_AMOUNT at Beijing hour: top up from funding or sweep excess back. Skip and WeChat notify when active positions exist.
Co-authored-by: Cursor <cursoragent@cursor.com>
Env POSITION_SIZING_MODE switches risk vs full-margin (available*buffer, BTC/ETH 10x). Blocks trend/roll/key auto opens in full margin, purges breakout/fib monitors with WeChat notice, keeps RR check and initial SL snapshot for records.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align .env.example blocks and add sync script to merge AUTO_TRANSFER_* into existing instance .env files without touching API secrets.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer sapi asset/wallet/balance Funding USDT (matches App), merge get-funding-asset and ccxt as fallbacks, and add optional BINANCE_FUNDING_INCLUDE_SPOT plus a richer verify script.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sum free+locked/freeze from ccxt funding balance and fall back to get-funding-asset SAPI so the header matches Binance APP funding account.
Co-authored-by: Cursor <cursoragent@cursor.com>