bbgo  by c9s

Go framework for crypto trading bot development

created 4 years ago
1,384 stars

Top 29.8% on sourcepulse

GitHubView on GitHub
Project Summary

BBGO is a Go-based framework for building cryptocurrency trading bots, designed for both end-users running pre-built strategies and developers creating custom trading logic. It offers exchange abstraction, real-time data streams, order execution, backtesting, and a suite of technical indicators, aiming to provide a robust and flexible platform for automated crypto trading.

How It Works

BBGO employs an event-driven architecture, processing market data and executing trades through a modular system. Key features include an exchange abstraction layer supporting multiple exchanges (Binance, OKX, KuCoin, etc.), real-time order book and market data via WebSockets, and a backtesting engine for strategy validation. It also supports high-precision floating-point arithmetic via the dnum library for accurate financial calculations.

Quick Start & Requirements

  • Install: Download binaries from the Release Page or use setup scripts like bash <(curl -s https://raw.githubusercontent.com/c9s/bbgo/main/scripts/setup-grid.sh) binance.
  • Prerequisites: Go SDK 1.22+, Linux/macOS/Windows (WSL). Exchange API keys are required.
  • Setup: Configuration involves creating .env.local (API keys) and bbgo.yaml files.
  • Docs: Documentation Index

Highlighted Details

  • Supports 4+ major exchanges with abstraction.
  • Includes 20+ built-in technical indicators (e.g., MACD, RSI, Bollinger Bands).
  • Offers 15+ diverse built-in strategies (e.g., Grid, Market Making, Trend Following).
  • Features a React-powered Web Dashboard and Kubernetes/Helm support for deployment.

Maintenance & Community

Licensing & Compatibility

  • License: AGPL License.
  • Compatibility: AGPL's copyleft provisions may require derivative works to be open-sourced if linked dynamically or statically. Commercial use requires careful consideration of AGPL compliance.

Limitations & Caveats

  • The AGPL license imposes strong copyleft requirements, potentially impacting closed-source commercial integrations.
  • SQLite support for data synchronization is noted as not fully supported; MySQL is recommended.
  • Adding support for new exchanges is available via a paid service (10 ETH).
Health Check
Last commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
47
Issues (30d)
1
Star History
53 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.