feat(instance): add exchange account ledger tab with SSE sync

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-10 09:51:45 +08:00
parent 425fc701bc
commit 245b85ad27
26 changed files with 1994 additions and 5 deletions
@@ -9,6 +9,7 @@ DISPLAY_RUNTIME_PREFIX = "display."
DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
"show_nav_dashboard": False,
"show_nav_account_ledger": False,
"show_nav_key_monitor": True,
"show_nav_trade": True,
"show_nav_strategy": True,
@@ -30,6 +31,7 @@ DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
DISPLAY_LABELS: dict[str, str] = {
"show_nav_dashboard": "数据看板",
"show_nav_account_ledger": "账户流水",
"show_nav_key_monitor": "关键位监控",
"show_nav_trade": "实盘下单",
"show_nav_strategy": "策略交易",
@@ -51,6 +53,7 @@ DISPLAY_LABELS: dict[str, str] = {
NAV_TAB_ALLOWED: dict[str, str] = {
"dashboard": "show_nav_dashboard",
"account_ledger": "show_nav_account_ledger",
"key_monitor": "show_nav_key_monitor",
"trade": "show_nav_trade",
"strategy": "show_nav_strategy",
@@ -116,6 +119,7 @@ def tab_allowed(tab: str, display: Optional[dict[str, bool]] = None) -> bool:
def display_meta_for_ui() -> list[dict[str, Any]]:
nav_keys = [
"show_nav_dashboard",
"show_nav_account_ledger",
"show_nav_key_monitor",
"show_nav_trade",
"show_nav_strategy",