Bbgo
The modern cryptocurrency trading bot framework written in Go.
Install / Use
/learn @c9s/BbgoREADME
BBGO
A modern crypto trading bot framework written in Go.
Current Status
<img alt="open collective badge" src="https://opencollective.com/bbgo/tiers/badge.svg">
<img alt="open collective badge" src="https://opencollective.com/bbgo/tiers/backer/badge.svg?label=backer&color=brightgreen" />
Community
What You Can Do With BBGO
Trading Bot Users 💁♀️ 💁♂️
You can use BBGO to run the built-in strategies.
Strategy Developers 🥷
You can use BBGO's trading unit and back-test unit to implement your own strategies.
Trading Unit Developers 🧑💻
You can use BBGO's underlying common exchange API; currently, it supports 8 major exchanges, so you don't have to repeat the implementation.
Features
- Exchange abstraction interface.
- Stream integration (user data web socket, market data web socket).
- Real-time orderBook integration through a web socket.
- TWAP order execution support. See TWAP Order Execution
- PnL calculation.
- Slack/Telegram notification.
- Back-testing: KLine-based back-testing engine. See Back-testing
- Built-in parameter optimization tool.
- Built-in Grid strategy and many other built-in strategies.
- Multi-exchange session support: you can connect to more than 2 exchanges with different accounts or subaccounts.
- Indicators with interface similar
to
pandas.Series(series)(usage):- Accumulation/Distribution Indicator
- Arnaud Legoux Moving Average
- Average True Range
- Bollinger Bands
- Commodity Channel Index
- Cumulative Moving Average
- Double Exponential Moving Average
- Directional Movement Index
- Brownian Motion's Drift Factor
- Ease of Movement
- Exponentially Weighted Moving Average
- Hull Moving Average
- Trend Line (Tool)
- Moving Average Convergence Divergence Indicator
- On-Balance Volume
- Pivot
- Running Moving Average
- Relative Strength Index
- Simple Moving Average
- Ehler's Super Smoother Filter
- Stochastic Oscillator
- SuperTrend
- Triple Exponential Moving Average
- Tillson T3 Moving Average
- Triangular Moving Average
- Variable Index Dynamic Average
- Volatility Indicator
- Volume Weighted Average Price
- Zero Lag Exponential Moving Average
- Fisher Transform
- G-H Filter (Alpha-Beta Filter)
- Geometric Moving Average
- Kalman Filter
- Klinger Oscillator
- Linear Regression
- Parabolic SAR
- True Strength Index
- UT Bot Alert
- Volume Weighted Moving Average
- Weighted Drift
- Welles Wilder's Moving Average
- Standard Deviation
- ATR Percentage
- Volume Profile
- And more...
- HeikinAshi OHLC / Normal OHLC (check this config)
- React-powered Web Dashboard.
- Docker image ready.
- Kubernetes support.
- Helm chart ready.
- High precision float point (up to 16 digits, run with
-tags dnum).
Screenshots


Built-in Strategies
| strategy | description | type | backtest support | |-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|------------|------------------| | grid | the first generation grid strategy, it provides more flexibility, but you need to prepare inventories | maker | | | grid2 | the second generation grid strategy, it can convert your quote asset into a grid, supports base+quote mode | maker | | | bollgrid | strategy implements a basic grid strategy with the built-in bollinger indicator | maker | | | xmaker | cross exchange market making strategy, it hedges your inventory risk on the other side | maker | no | | xdepthmaker | cross exchange depth-based market making strategy | maker | no | | xfixedmaker | cross exchange fixed-spread market making strategy | maker | no | | xnav | this strategy helps you record the current net asset value | tool | no | | xalign | this strategy aligns your balance position automatically | tool | no | | xfunding | a funding rate fee strategy | funding | no | | autoborrow | this strategy uses margin to borrow assets, to help you keep a minimal balance | tool | no | | autobuy | automatically buys a specific asset periodically | tool | no | | pivotshort | this strategy finds the pivot low and enters the trade when the price breaks the previous low | long/short | | | schedule | this strategy buy/sell with a fixed quantity periodically, you can use this as a single DCA, or to refill the fee asset like BNB | tool | | | irr | this strategy opens the position based on the predicated return rate | long/short | | | bollmaker | this strategy holds a long-term long/short position, places maker orders on both sides, and uses a bollinger band to control the position size | maker | | | wall | this strategy creates a wall (large amount of order) on the order book | maker | no | | scmaker | this market making strategy is designed for stable coin markets, like USDC/USDT | maker | | | drift | | long/short | | | rsicross | this strategy opens a long position when the fast rsi crosses over the slow rsi, this is a demo strategy for using the v2 indicator | long/short | | | emacross | EMA crossover strategy | long/short | | | marketcap | this strategy implements a strategy that rebalances the portfolio based on the market capitalization | rebalance | no | | supertrend | this strategy uses DEMA and Supertrend indicator to open the long/short positi
