Skip to content

Latest commit

 

History

History
131 lines (86 loc) · 2.4 KB

CONTRIBUTING.md

File metadata and controls

131 lines (86 loc) · 2.4 KB

Requirements

# NodeJS v22.12 or higher
node -v

# PNPM v9.15 or higher
pnpm -v

# `moonrepo` must be installed
moon --version

# Docker (optional)
docker -v

Setup

  1. Clone the repository:
git clone [email protected]:bludnic/opentrader.git
  1. 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

Environment variables

The project uses a single .env file located in the root directory. Some packages may contain a symlink to the root .env.

  1. Create environment file .env in the root directory
cp .env.example .env
  1. Update the ADMIN_PASSWORD if you are going to expose the app externally.

Installation

  1. Install dependencies
pnpm install
  1. Run database migrations
moon run prisma:migrate
  1. Seed the database
moon run prisma:seed
  1. Build the project
moon run :build

Development

CLI

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.

UI

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

Apps

Project structure