fix(hub): archive chart perpetual label and trade row highlight

Label archive K-lines as USDT swap in title and API; highlight the full trade row when opening its chart.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 19:56:55 +08:00
parent a9637fafb2
commit a87234f627
5 changed files with 52 additions and 6 deletions
+4
View File
@@ -17,6 +17,7 @@ from hub_ohlcv_lib import (
TIMEFRAME_MS,
aggregate_ohlcv_bars,
normalize_chart_timeframe,
normalize_perpetual_symbol,
)
from hub_trades_lib import (
display_entry_type_label,
@@ -927,10 +928,13 @@ def resolve_archive_chart(
if not candles:
return {"ok": False, "msg": "视窗内无 K 线"}
ex_sym = normalize_perpetual_symbol(sym)
return {
"ok": True,
"exchange_key": ex_k,
"symbol": sym,
"exchange_symbol": ex_sym,
"market_type": "swap",
"timeframe": tf,
"mode": (mode or "hold").strip().lower(),
"range_mode": rm,