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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user