Skip to content

netfirms/niceboy

Repository files navigation

⚑ niceboy

A low-footprint, high-efficiency console trading bot designed for performance and simplicity.

niceboy is built for traders who value speed, reliability, and minimal resource usage. It provides a robust foundation for executing automated trading strategies directly from your terminal.

πŸ”„ How it Works

sequenceDiagram
    participant User
    participant Config as config.yaml
    participant Bot as niceboy Core
    participant Exch as Exchange
    participant UI as Console TUI

    User->>Config: 1. Set API Keys & Choice
    User->>Bot: 2. Launch Bot
    Bot->>Exch: 3. Fetch Market Data
    Bot->>Bot: 4. Run Strategy
    Bot->>UI: 5. Update Dashboard
Loading

✨ Features

  • πŸ›‘οΈ Grandmaster Trading Cockpit: A professional-grade terminal interface featuring a Real-Time Visual Chart, Tactical Hotkeys, and a high-stakes EMERGENCY KILL SWITCH (k).
  • πŸ“Š ASCII Order Book Heatmap: Visualize market pressure and liquidity walls with a live top-5 market depth widget.
  • πŸ’“ Global Market Pulse: Side-by-side tracking for BTC & ETH to provide essential market context while trading.
  • πŸš€ Low Footprint: Optimized Go core with sub-10MB memory usage and extreme CPU efficiency.
  • πŸ–₯️ Tabbed TUI Dashboard: Professionally styled multiple views for Stats, Portfolio, Orders, Strategy, and Audit Logs.
  • πŸ§ͺ Dry Run Simulator: Safely test strategies with real-time market data and simulated execution.
  • πŸ›‘οΈ Managed Risk: Built-in Stop Loss, Take Profit, and Trailing Stop guardrails.
  • πŸ”„ Self-Healing: Automatic WebSocket reconnection with exponential backoff and connection quality diagnostics.
  • πŸ—οΈ Git Security Hooks: Pre-commit scanning for leaked secrets and QA enforcement, ensuring 100% test passing.
  • πŸ”Œ Multi-Exchange: Production-ready adapters for Binance and Bitkub (V3 API).

πŸ› οΈ Technology Stack

  • Language: Go 1.24+ (Statically-linked, high-performance binary).
  • Interface: Bubble Tea & Lipgloss (Tactical Tabbed TUI).
  • Persistence: SQLite 3 (High-concurrency WAL-mode for trade history).
  • Logging: zerolog (Structured JSON + Human-readable audit trails).
  • Distribution: GoReleaser (Automated Multi-Arch binaries).

🧭 Choose Your Journey

Whether you are looking to run the bot or build upon it, follow the path that fits your role:

πŸ‘€ The User Journey (Run the Bot)

Goal: Deploy niceboy and start trading in under 5 minutes.

  1. Quick Start: Install & Run
  2. Configuration: Setting up Keys & Symbols
  3. Management: Running Multiple Instances

πŸ’» The Developer Journey (Build the Bot)

Goal: Setup the local dev environment and contribute core logic.

  1. Onboarding: Setup & Hello World
  2. Architecture: Understand the 5 Pillars
  3. Execution: Testing & Coverage Suite
  4. Build & Release: GoReleaser Workflow

πŸ“₯ Installation & Quick Start

The quickest way to get started is to use the πŸš€ Installation & Run Guide (docs/RUN.md), which contains detailed instructions for every platform.

🍏 macOS

brew install netfirms/niceboy/niceboy

🐧 Linux & πŸͺŸ Windows

Download the latest pre-compiled binary from the GitHub Releases page and follow the Run Guide.


⚑ Quick Start (Developer Path)

  1. Install Go: Ensure Go 1.24+ is installed.
  2. Cloning:
    git clone https://github.com/netfirms/niceboy.git
    cd niceboy
  3. Config Setup:
    cp config.example.yaml config.yaml
    # Edit config.yaml with your API keys
  4. Install Hooks: (Recommended for security)
    make install-hooks
  5. Launch TUI:
    go run cmd/niceboy/main.go
    Use Tab to switch between Dashboard and Audit Logs!

πŸ‘― Running Multiple Instances

niceboy supports running multiple independent instances on the same machine. Use CLI flags to specify unique configurations and log files:

# Instance 1: Binance
go run cmd/niceboy/main.go -config binance_config.yaml -log binance.log

# Instance 2: Bitkub
go run cmd/niceboy/main.go -config bitkub_config.yaml -log bitkub.log

For detailed setup, configuration, and production build instructions, see the Run Guide (docs/RUN.md).

πŸ“œ Documentation

βš–οΈ License

niceboy is released under the MIT License. See LICENSE for more details.

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. Please see our Contributing Guide for more details.


Built with ❀️ for the trading community.

About

niceboy is a low footprint console trading bot

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors