TUI Dashboard
Interactive terminal interface for real-time monitoring and control

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

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

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

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

Real-time event viewer:
- Scrollable log history
- Color-coded log levels (INFO, WARN, ERROR)
- Trade executions, funding payments, system events
- Use
j/kto scroll through history
Keybindings
Navigation
| Key | Action |
|---|---|
Tab | Switch to next tab |
Shift+Tab | Switch to previous tab |
1-4 | Jump to specific tab |
Scrolling
| Key | Action |
|---|---|
j or ↓ | Scroll down / Next item |
k or ↑ | Scroll up / Previous item |
g | Go to top |
G | Go to bottom |
Page Up | Scroll up one page |
Page Down | Scroll down one page |
Actions
| Key | Action |
|---|---|
p | Pause/Resume trading bot |
r | Force refresh data |
x or Del | Close selected position |
? or F1 | Toggle help overlay |
q | Quit 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
Yto confirm and close the position - Press
NorEscto 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
| Environment | Tick Rate | Notes |
|---|---|---|
| Local | 100-250ms | Smooth updates |
| LAN | 250-500ms | Good balance |
| Remote/SSH | 500-1000ms | Reduces bandwidth |
| Slow connection | 1000-2000ms | Minimal updates |
Dashboard vs Headless Mode
| Feature | wealth dashboard | wealth run |
|---|---|---|
| Interface | Interactive TUI | Headless (logs only) |
| Resource usage | Higher (rendering) | Lower |
| Best for | Development, monitoring | Production, servers |
| Position management | Visual with keyboard | API/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
Related
- CLI Reference - Full command documentation
- Getting Started - Initial setup
- Monitoring - Grafana dashboards for production