OpenTrader is a self-hosted cryptocurrency trading bot, featuring built-in and highly customizable strategies, integration with technical indicators, high-frequency trading, and cross-exchange trading with support for 100+ exchanges via CCXT.
Features:
- β¨ Robust UI: A user-friendly interface for managing the bots.
- π Multiple Exchanges: Trade across various cryptocurrency exchanges.
- π Paper Trading: Test your strategies without risking real money.
- π Backtesting: Backtest your strategies using historical data.
- βοΈ Easy Installation: Install effortlessly via NPM.
Strategies:
- βοΈ GRID: Make profits from market fluctuations by creating a grid of buy and sell orders.
- βοΈ DCA: Entry with multiple orders to average the entry price and sell on price swings.
- βοΈ RSI: Places orders based on the RSI indicator value.
- π οΈ CUSTOM: Build your own strategy in just a few lines of code.
This project is a personal passion, developed in my free time. If you find it useful, please give it a βοΈ. Your support means a lot and motivates me to keep improving the bot. If you'd like to make a donation, see the options below. π
Connect with developers, request features, and receive support. Join our community on Discord.
For announcements and updates, follow us on Twitter and Telegram.
Get started with OpenTrader in just a few steps. Follow this quick guide to install, configure, and run your crypto trading bot.
- Install OpenTrader globally using npm:
npm install -g opentrader
- Set an admin password for later accessing the OpenTrader UI:
opentrader set-password <password>
- Start the OpenTrader app
opentrader up
The app will start the RPC server and listen on port 8000.
Tip: Use
opentrader up -d
to start the app as a daemon. To stop it, runopentrader down
.
The user interface allows managing multiple bots and strategies, viewing backtest results, and monitoring live trading.
You can access the OpenTrader UI on: http://localhost:8000
Copy the exchanges.sample.json5
file to exchanges.json5
and add your API keys.
Available exchanges: OKX, BYBIT, BINANCE, KRAKEN, COINBASE, GATEIO, BITGET
Create the strategy configuration file config.json5
. We will use the grid
strategy as an example.
{
// Grid strategy params
settings: {
highPrice: 70000, // upper price of the grid
lowPrice: 60000, // lower price of the grid
gridLevels: 20, // number of grid levels
quantityPerGrid: 0.0001, // quantity in base currency per each grid
},
pair: "BTC/USDT",
exchange: "DEFAULT",
}
Currently supported strategies:
grid
,dca
,rsi
Command: opentrader backtest <strategy> --from <date> --to <date> -t <timeframe>
Example running a grid
strategy on 1h
timeframe.
opentrader backtest grid --from 2024-03-01 --to 2024-06-01 -t 1h
To get more accurate results, use a smaller timeframe, e.g. 1m, however, it will take more time to download OHLC data from the exchange.
Command: opentrader trade <strategy>
Example running a live trading with grid
strategy.
opentrader trade grid
To stop the live trading, run
opentrader stop
- Strategies dir: packages/bot-templates
- Indicators: packages/indicators
- Exchange connectors: packages/exchanges
Licensed under the Apache 2.0 License. See the LICENSE file for more information.
This software is for educational purposes only. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS. Do not risk money that you are afraid to lose. There might be bugs in the code - this software DOES NOT come with ANY warranty.
If you find OpenTrader useful and would like to support its development, consider making a donation. Your contributions will help cover the costs of maintaining and improving this project.
Donate via:
- Bitcoin (BTC):
1LBqWWne1ac455UmUDVF32ozVAhy1HgVXn
- Ethereum (ETH):
0x60371d49F9Cc7ec7d7e34979D5DD31996B7B43Ff
Thank you for your support!