Hub monitor: read-only OKX options positions aggregation (Phase B).

Expose /api/hub/options/snapshot from OKX instance and render options summary on hub monitor cards when the options capability is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 12:55:35 +08:00
parent 11a50c02cd
commit 6cc3382526
10 changed files with 299 additions and 6 deletions
+6 -1
View File
@@ -50,7 +50,7 @@ DEFAULT_EXCHANGES = [
"flask_url": "http://127.0.0.1:5004",
"review_url": "http://127.0.0.1:5004/records",
"enabled": True,
"capabilities": ["key", "trend"],
"capabilities": ["key", "trend", "options"],
},
{
"id": "2",
@@ -109,6 +109,11 @@ def load_settings() -> dict:
ex["env_disabled"] = True
else:
ex.setdefault("env_disabled", False)
if ex.get("key") == "okx":
caps = list(ex.get("capabilities") or [])
if "options" not in caps:
caps.append("options")
ex["capabilities"] = caps
return data