fix: label trend breakeven handoff as 趋势回调 across four exchanges

Set order monitor and trade record source to trend pullback after handoff; unify hub and instance display; add migration script for legacy rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-04 06:30:14 +08:00
parent 97e0355209
commit 1b3f661bad
10 changed files with 167 additions and 51 deletions
+8 -1
View File
@@ -283,7 +283,14 @@ def register_hub_routes(app):
for row in conn.execute(
"SELECT * FROM order_monitors WHERE status='active' ORDER BY id DESC"
).fetchall():
orders.append(_row_to_dict(row))
od = _row_to_dict(row)
try:
from strategy_trade_labels import apply_order_monitor_source_labels
od = apply_order_monitor_source_labels(od)
except Exception:
pass
orders.append(od)
trends = []
if c.get("has_trend"):
for row in conn.execute(