diff --git a/lib/hub/hub_calculator_market_lib.py b/lib/hub/hub_calculator_market_lib.py index d1ba5cd..453aa0e 100644 --- a/lib/hub/hub_calculator_market_lib.py +++ b/lib/hub/hub_calculator_market_lib.py @@ -13,7 +13,15 @@ from urllib.parse import urlencode try: from settings_store import enabled_exchanges, load_settings except ImportError: - from manual_trading_hub.settings_store import enabled_exchanges, load_settings + try: + from manual_trading_hub.settings_store import enabled_exchanges, load_settings + except ImportError: + # CoinOX 独立实例无中控:精度函数仍可用;中控拉实例行情相关 API 不可用 + def load_settings() -> dict[str, Any]: + return {"exchanges": []} + + def enabled_exchanges() -> list: + return [] MARKET_CACHE: dict[str, tuple[float, dict[str, Any]]] = {} MARKET_LOCK = threading.Lock()