Allow CoinOX to start without manual_trading_hub by stubbing hub settings imports.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,7 +13,15 @@ from urllib.parse import urlencode
|
|||||||
try:
|
try:
|
||||||
from settings_store import enabled_exchanges, load_settings
|
from settings_store import enabled_exchanges, load_settings
|
||||||
except ImportError:
|
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_CACHE: dict[str, tuple[float, dict[str, Any]]] = {}
|
||||||
MARKET_LOCK = threading.Lock()
|
MARKET_LOCK = threading.Lock()
|
||||||
|
|||||||
Reference in New Issue
Block a user