Skip to content

Command: standx dashboard MVP - 静态显示版本 #156

@agentx1boss

Description

@agentx1boss

概述

MVP 版本:纯静态显示,无交互功能。一个命令输出所有面板信息。

使用方式

# 基础用法
standx dashboard

# 指定交易对
standx dashboard --symbol BTCUSDT

# 自动刷新(每 N 秒)
standx dashboard --symbol BTCUSDT --watch 5

# 紧凑模式(无 recent trades)
standx dashboard --compact

输出示例

┌────────────────────────────────────────────────────────────────────────┐
│  standx dashboard                                       refresh: 10:32 │
├────────────────────────────────────────────────────────────────────────┤
│  TICKERS: BTC $67,890 ▲2.34% | ETH $3,520 ▲1.25% | SOL $142.5 ▼0.88%  │
├────────────────────────────────────────────────────────────────────────┤
│  ACCOUNT: Total=$67,890.50  Available=$45,230.50  PnL=+$1,556 ▲2.34% │
├────────────────────────────────────────────────────────────────────────┤
│  POSITIONS:                                                         │
│  #1 BTCUSDT LONG 0.5 @66,000 mark=67,890 pnl=+$945 ▲                 │
│  #2 ETHUSDT SHORT 2.0 @3,500 mark=3,520 pnl=+$88 ▲                   │
├────────────────────────────────────────────────────────────────────────┤
│  ORDER BOOK (BTCUSDT):                    ACTIVE ORDERS:              │
│  Asks: 67895(2.5) 67890(5.0) 67888(1.2)    #1 BUY 0.1 @65,000        │
│  Bids: 67885(3.2) 67880(8.1) 67875(1.9)    #2 SELL 0.2 @70,000       │
├────────────────────────────────────────────────────────────────────────┤
│  RECENT TRADES:                                                      │
│  10:32:41 BTC 67,890 0.5 BUY                                         │
│  10:31:20 BTC 67,885 1.2 SELL                                        │
├────────────────────────────────────────────────────────────────────────┤
│  Usage: standx dashboard --symbol BTCUSDT --watch 5                       │
└────────────────────────────────────────────────────────────────────────┘

数据来源

面板 命令
TICKERS standx market tickers
ACCOUNT standx account balances
POSITIONS standx account positions
ORDER BOOK standx market depth --symbol {ticker}
ACTIVE ORDERS standx account orders
RECENT TRADES standx market trades --symbol {ticker}

MVP 特点

  • ✅ 纯静态输出,无交互
  • ✅ 支持 --watch N 自动刷新
  • ✅ 支持 --symbol 指定交易对
  • ✅ 支持 --compact 紧凑模式
  • ✅ 支持 -o json 机器可读输出
  • ❌ 无快捷键交互
  • ❌ 无 TUI 界面

实现优先级

  • MVP: 静态输出 + watch 刷新
  • 快捷键支持 (o/c/r/q)
  • Ticker 切换
  • MINI K-LINE 组件

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions