No description
This repository has been archived on 2026-04-12. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Go 98.9%
  • Makefile 1.1%
Find a file
2026-03-08 17:48:22 +03:00
cmd/tradebotui Adapt client for server-side streaming API 2026-03-05 14:47:49 +03:00
docs/features add bot control API integration and UI tab 2026-03-02 20:50:47 +03:00
internal Restore robot version loading in RefreshAccounts 2026-03-06 15:49:52 +03:00
openspec Add Control API get methods and Settings tab 2026-03-03 18:51:04 +03:00
scripts Add Linux desktop integration and improve error handling 2026-03-02 00:12:19 +03:00
.gitignore Cleanup 2026-03-08 17:48:22 +03:00
AGENTS.md Add commit message language requirement to AGENTS.md 2026-03-04 16:42:23 +03:00
CHANGELOG.md Add CHANGELOG.md and update AGENTS.md with changelog requirements 2026-03-03 19:29:41 +03:00
go.mod Adapt client for server-side streaming API 2026-03-05 14:47:49 +03:00
go.sum Update Control API integration for tradebotpp v0.9.8 2026-03-04 16:41:46 +03:00
Icon.png Add initial Go module and workspace setup with dependencies, including new commands for workflow management and onboarding. Added binary files for application and icon assets. 2026-02-13 18:40:12 +03:00
Makefile add bot control API integration and UI tab 2026-03-02 20:50:47 +03:00
QWEN.md Init qwen 2026-03-03 14:22:59 +03:00
README.md Add Control API get methods and Settings tab 2026-03-03 18:51:04 +03:00

tradebotui

Trading Robot UI - A desktop application for monitoring trading accounts and positions.

Features

  • Dashboard: View aggregated metrics across all trading accounts
  • Account Filtering: Click account buttons in sidebar to filter dashboard content by specific account
  • Positions Management: View and monitor open positions
  • Real-time Updates: Periodic refresh of account data (every 30 seconds)
  • Multiple Accounts: Support for multiple trading accounts with aggregated views
  • Robot Version Display: View backend robot version in header with detailed info on click
  • Control Panels: Send YAML configurations to backend (Config, State, Strategy)
  • Config Refresh: Load current configuration from backend with Refresh button
  • Unsaved Changes Protection: Confirmation dialog when overwriting unsaved changes

Robot Version Display

The header displays the backend robot version next to the connection status:

  • Version Label: Shows short version (e.g., "v0.4.0") in the header
  • Clickable: Click on version to open modal dialog with full details
  • Full Info: Modal shows Version, Commit hash, and Build Time
  • Auto-refresh: Version updates automatically with each data refresh
  • Error Handling: Shows "v?" if version cannot be fetched

Control Panels

The Settings tab provides three panels for managing backend configuration:

  • Trading Config: Manage trading parameters (risk limits, slippage prevention)
  • Notification Config: Configure ntfy and Telegram notifications
  • Strategy Config: Manage strategy weights and parameters

Refresh Configuration

Each panel includes a Refresh button (⟳) to load current configuration from the backend:

  • Auto-load: Configuration can be loaded manually by clicking Refresh
  • Account-based: Configuration is loaded for the currently selected account
  • Loading State: Buttons are disabled during loading to prevent conflicts
  • Error Display: Load errors are shown in the panel status area
  • Unsaved Changes: Confirmation dialog appears when overwriting unsaved changes

YAML Format

Each panel shows a placeholder with the expected YAML format. The account_id is automatically provided from the selected account and should not be included in the YAML input.

Account Filtering

The sidebar includes account buttons that allow filtering dashboard content:

  • All Accounts Button: Shows aggregated view across all accounts (default)
  • Account Buttons: Filter dashboard to show data for specific account only
  • Visual Indicators: Active filter is highlighted with different button styling
  • Persistent Filter: Filter applies across all dashboard tabs (balance, positions)
  • Stay on Current Tab: Selecting an account doesn't switch tabs - stays on current view

Settings

The Settings tab contains configuration panels:

  • API Settings: Configure backend connection (URL, credentials) via the gear icon in header
  • Trading Config: Backend configuration for trading parameters
  • Notification Config: Backend configuration for notifications
  • Strategy Config: Backend configuration for trading strategies

Each configuration panel stretches to fill available window space and includes:

  • YAML text input with syntax validation
  • Refresh button to load current values from backend
  • Save button to push configuration to backend
  • Status indicator showing validation and save results

Building

# Build the application
make build

# Install to ~/.local/bin
make install

# Build WASM version (for web)
make build.wasm

Requirements

  • Go 1.25+
  • Fyne v2.7.2
  • Backend: tradebotpp v0.4.0 (gRPC service)

Running

# Run from source
go run ./cmd/tradebotui/main.go

# After installation
~/.local/bin/tradebotui

Testing

# Run all tests
make test

# Run tests with coverage
go test -cover ./...

Project Structure

cmd/tradebotui/          # Application entry point
internal/
  ui/                    # UI orchestration
    app.go               # Main controller
    tabs.go              # Tab management
    sidebar.go           # Account sidebar
    header.go            # Header with status
    settings.go          # Settings tab with config panels
  client/                # gRPC client
    client.go            # Connection management
    control.go           # Control API methods
  domain/                # Domain models
    account.go           # Account model
    position.go          # Position model
  widgets/               # Custom widgets
    control.go           # ControlPanel widget
    cards.go             # Stat cards

License

See LICENSE file for details.