- Source code: https://github.com/bludnic/opentrader
- Binaries: https://www.npmjs.com/package/opentrader
These packages can be imported everywhere
- types: Defines types and interfaces used in the whole project.
- db, prisma: Manages the database schema, migrations, and custom Prisma models.
- logger: Provides a logger instance.
- tools: Includes utilities for grid calculations, price/balance formatting, and candlestick analysis.
- bot-templates: Contains strategies logic. Each strategy is a separate file. Includes predefined strategies like GRID strategy and RSI strategy.
- bot-processor: It’s a strategy runner, which is responsible for executing a strategy and handling commands such as placing and canceling orders.
- bot-backtesting: Offers functionality for backtesting a strategy.
There are independent packages that may be later published on NPM
- exchanges: Contains exchange connectors with an unified API. It uses CCXT under the hood.
- indicators: Calculates technical analysis (TA) indicators. Currently supports only RSI indicator.
- bot-store: Global state manager for storing market data such as candles, order books, and public trades, which are used later to feed a strategy.
- event-bus: Event emitter for bot lifecycle (created, started, stopped)
- processing: Handles trade execution, including placing orders, refreshing statuses, and canceling orders.
- trpc: Provides API endpoints for managing bots and exchange accounts.
- bot, daemon: Bootstraps the bot, subscribes to public and private channels via WebSockets. Starts a web server to expose tRPC endpoints. Subscribes to the EventBus for reacting to events like bot creation, bot started, and bot stopped.
- apps/cli: Provides CLI commands for managing the bot
- frontend: Contains the UI for managing multiple bots.
Currently, the frontend resides in a private repo until I decide on the license and funding strategy. For early adopters, I will offer lifetime access to the frontend for free.
Everything is bundled toghether and published on NPM as opentrader