# NodeJS v22.12 or higher
node -v
# PNPM v9.15 or higher
pnpm -v
# `moonrepo` must be installed
moon --version
# Docker (optional)
docker -v
- Clone the repository:
git clone [email protected]:bludnic/opentrader.git
- Clone Git submodules (optional). Run this only if you have access to the opentrader-pro repository (private). Refer to the UI section below.
git submodule update --init
The project uses a single .env
file located in the root directory. Some packages may contain a symlink to the root .env
.
- Create environment file
.env
in the root directory
cp .env.example .env
- Update the
ADMIN_PASSWORD
if you are going to expose the app externally.
- Install dependencies
pnpm install
- Run database migrations
moon run prisma:migrate
- Seed the database
moon run prisma:seed
- Build the project
moon run :build
You can interact with the bot by using CLI.
If you made changes in the code, don't forget to rebuild the project moon run :build
.
# List of commands
./bin/cli.sh --help
# Start the daemon
./bin/cli.sh up
# Running Grid bot strategy
./bin/cli.sh trade grid
# Running RSI strategy
./bin/cli.sh trade rsi
Note
See the CLI section in the README.md on how to connect an exchange and configure the strategy params.
The UI allows managing multiple bots and strategies, viewing backtest results, and monitoring live trading.
Important
Currently, the UI resides in a private repo until I decide on the licensing and funding model, so this option is not available to the public yet.
Option 1: Run both frontend
and backend
apps in a single terminal
moon run :dev
Option 2: Run each app in a separate terminal
First Terminal
moon run frontend:dev
Second Terminal
moon run backend:dev
- Frontend: http://localhost:3000
- Backend: http://localhost:4000
- CLI: http://localhost:8000
- Strategies dir: packages/bot-templates
- Indicators: packages/indicators
- Exchange connectors: packages/exchanges