From 30d7b0c8720e0b7426726340bdf3ce49f8fae7e9 Mon Sep 17 00:00:00 2001 From: dekun Date: Sun, 4 Oct 2026 19:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E6=8E=A7=E5=BF=AB=E7=85=A7=E9=99=84?= =?UTF-8?q?=E5=B8=A6=20BTC/ETH=20=E6=8A=A5=E4=BB=B7=EF=BC=8C=E4=BE=9B?= =?UTF-8?q?=E6=80=BB=E8=A7=88=E4=BB=8E=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=9B=9E?= =?UTF-8?q?=E4=BC=A0=E5=B1=95=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- lib/hub/hub_bridge_register.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/hub/hub_bridge_register.py b/lib/hub/hub_bridge_register.py index 16dbd35..51a19bd 100644 --- a/lib/hub/hub_bridge_register.py +++ b/lib/hub/hub_bridge_register.py @@ -189,6 +189,20 @@ def _enrich_hub_protocol(snap: dict[str, Any], *, app_module: Any) -> dict[str, from datetime import datetime out["ts"] = datetime.now().strftime("%Y-%m-%d %H:%M:%S") + quotes = {"tickers": [], "updated_at": out.get("ts") or ""} + try: + from lib.market.nav_spot_tickers_lib import build_nav_spot_tickers + + ex = getattr(app_module, "exchange", None) + reset_hour = int(getattr(app_module, "TRADING_DAY_RESET_HOUR", 8) or 8) + tickers = build_nav_spot_tickers(ex, reset_hour=reset_hour) if ex is not None else [] + quotes = { + "tickers": tickers if isinstance(tickers, list) else [], + "updated_at": out.get("ts") or "", + } + except Exception: + pass + out["quotes"] = quotes return out