TUI Dashboard

Interactive terminal interface for real-time monitoring and control


Wealth TUI Dashboard

The Wealth Trading System includes a powerful terminal user interface (TUI) built with Ratatui. It provides real-time monitoring of your trading bot with an intuitive keyboard-driven interface.

Quick Start

# Run the TUI dashboard
wealth dashboard

# With dynamic pair discovery enabled
wealth dashboard --enable-discovery

# Custom refresh rate (for slow connections)
wealth dashboard --tick-rate 500

Building with TUI Support

The TUI feature must be enabled at compile time:

cargo build --release --features tui

Pre-built binaries from GitHub releases include TUI support by default.

Dashboard Tabs

The dashboard has four main tabs, accessible with Tab and Shift+Tab:

📊 Dashboard Tab

Dashboard Tab

The overview tab shows:

  • Bot Status - Running state, uptime, mode (paper/live)
  • Health Summary - Exchange connectivity, WebSocket status
  • Key Metrics - Total P&L, open positions, funding collected
  • Recent Opportunities - Latest arbitrage opportunities detected

📈 Positions Tab

Positions Tab

Monitor your active positions:

  • Position symbol and direction (long/short sides)
  • Entry prices and current prices
  • Unrealized P&L with percentage
  • Funding collected per position
  • Position age and last funding payment

Use j/k or arrow keys to select a position, then x to close it.

💰 Funding Tab

Funding Tab

Live funding rates across all exchanges:

  • Real-time rates updated every tick
  • Color-coded rates (green positive, red negative)
  • Annualized rate display
  • Next funding countdown timer
  • Spread between exchanges highlighted

📜 Logs Tab

Logs Tab

Real-time event viewer:

  • Scrollable log history
  • Color-coded log levels (INFO, WARN, ERROR)
  • Trade executions, funding payments, system events
  • Use j/k to scroll through history

Keybindings

KeyAction
TabSwitch to next tab
Shift+TabSwitch to previous tab
1-4Jump to specific tab

Scrolling

KeyAction
j or Scroll down / Next item
k or Scroll up / Previous item
gGo to top
GGo to bottom
Page UpScroll up one page
Page DownScroll down one page

Actions

KeyAction
pPause/Resume trading bot
rForce refresh data
x or DelClose selected position
? or F1Toggle help overlay
qQuit dashboard

Closing Positions

When you press x on a selected position, a confirmation dialog appears:

┌─ Close Position ─────────────────┐
│ Close position BTCUSDT?          │
│                                  │
│ Long: Binance                    │
│ Short: Bybit                     │
│ Size: $1000.00                   │
│                                  │
│ [Y] Yes  [N] No  [Esc] Cancel    │
└──────────────────────────────────┘
  • Press Y to confirm and close the position
  • Press N or Esc to cancel

The bot will atomically close both legs of the position with rollback protection.

Configuration Options

Command Line Options

wealth dashboard [OPTIONS]

Options:
  --enable-discovery     Enable dynamic pair discovery
  --tick-rate <MS>       UI refresh rate in milliseconds (default: 250)
  -v, -vv, -vvv          Verbosity level
  -c, --config <FILE>    Custom config file

Tick Rate Recommendations

EnvironmentTick RateNotes
Local100-250msSmooth updates
LAN250-500msGood balance
Remote/SSH500-1000msReduces bandwidth
Slow connection1000-2000msMinimal updates

Dashboard vs Headless Mode

Featurewealth dashboardwealth run
InterfaceInteractive TUIHeadless (logs only)
Resource usageHigher (rendering)Lower
Best forDevelopment, monitoringProduction, servers
Position managementVisual with keyboardAPI/CLI only

Troubleshooting

TUI Not Available

If you see "TUI feature not enabled":

# Check if binary was built with TUI
wealth dashboard
# Error: TUI feature not enabled

# Rebuild with TUI feature
cargo build --release --features tui

Display Issues

Garbled output:

# Reset terminal
reset

# Try different terminal emulator
# Recommended: kitty, alacritty, wezterm, iTerm2

Colors not showing:

# Ensure TERM is set correctly
export TERM=xterm-256color
wealth dashboard

Too small:

# Minimum recommended size: 80x24
# Resize terminal or reduce font size

SSH/Remote Issues

# Use slower tick rate
wealth dashboard --tick-rate 1000

# Enable SSH compression
ssh -C user@host

# Use mosh for better responsiveness
mosh user@host -- wealth dashboard