JT Trader is a powerful algorithmic trading platform built on modern technology stack. The platform provides a complete set of tools for creating, testing, and deploying trading strategies.
- π Key Features
- πΌοΈ Screenshots
- π Requirements
- π Installation
- βοΈ Configuration
- π Running
- π Documentation
- π License
- π€ Support
- π Related Projects
- Strategy Development - Create trading strategies using TypeScript and modern API
- Strategy Testing - Built-in tester for validating strategies on historical data
- Real-time Trading - Run strategies in real-time mode
- Web Interface - User-friendly web interface for strategy management
- Reporting - Detailed analytics and reports on trading operations
- Cross-Platform - Works on Windows, macOS, and Linux
- Cloud Ready - Can be deployed on cloud platforms
- Node.js v18.x (not tested yet on other versions)
- Clone the repository:
git clone --recurse-submodules git@github.com:jt-lab-com/jt-trader.gitGo to the project directory and install dependencies:
- Install dependencies:
cd jt-trader && yarn- Configure environment variables by copying
.env.exampleto.env.
Run the following command to automatically generate a .env file with all required environment variables:
ts-node scripts/setup-environment.tsCreate a .env file in the project root directory by copying .env.example and set the following environment variables:
# Main settings
PORT=8080
SITE_API_HOST=https://jt-lab.com
DATABASE_URL="file:/<path>/storage.db"
ROLLUP_TS_CONFIG=/<path>/tsconfig.bundler.json
STRATEGY_FILES_PATH=/<path>/strategy-source/src
EXCHANGE_LIST_FILE_PATH=/<path>/exchanges.conf
ARTIFACTS_DIR_PATH=/<path>/artifacts
HISTORY_BARS_PATH=/<path>/history-bars
LOGS_DIR_PATH=/<path>/artifacts
STANDALONE_APP=1
# both, realtime, tester
ENGINE_MODE="both"
# disk | redis
CACHE_DRIVER=disk
# secret code used for public servers to prevent unauthorized access
#ACCESS_SECRET=your_secret_key| Variable | Description | Example |
|---|---|---|
PORT |
Port for running the application | 8080 |
SITE_API_HOST |
Base URL for site API | https://jt-lab.com |
STANDALONE_APP |
Local mode operation (1 = enabled) | 1 |
ENGINE_MODE |
Trading engine mode | "both", "realtime", "tester" |
DATABASE_URL |
Absolute path to SQLite database file | "file:/path/to/your/project/storage.db" |
STRATEGY_FILES_PATH |
Absolute path to strategy source code | /path/to/your/project/strategy-source/src |
ROLLUP_TS_CONFIG |
Path to TypeScript configuration | tsconfig.bundler.json |
ARTIFACTS_DIR_PATH |
Path to strategy reports directory | /path/to/your/project/artifacts |
HISTORY_BARS_PATH |
Path to historical data directory | downloaded-history-bars |
LOGS_DIR_PATH |
Path to logs directory | artifacts |
REDIS_URL |
Redis connection URL (optional) | redis://localhost:6379 |
ACCESS_SECRET |
Secret code used for public servers to prevent unauthorized access | your_secret_key |
CACHE_DRIVER |
Specifies where the application cache is stored. Available options: redis or disk (local database file). |
redis |
ACCOUNT_LIMIT_RUNTIMES |
Maximum number of concurrently running runtimes. Default: 5 | |
ACCOUNT_LIMIT_OPTIMIZER_SCENARIO |
Maximum number of sets for script optimization. Default: 15 | |
ACCOUNT_LIMIT_API_CALL_PER_SEC |
Maximum allowed number of exchange API calls per second. Default: 5 | |
ACCOUNT_LIMIT_TESTER_MAX_PROCESSES |
Maximum number of concurrently running processes for the tester. Default: 5 | |
ACCOUNT_LIMIT_TESTER_MAX_MEMORY |
Maximum memory (in MB) allocated for tester processes. Default: 1024 | |
ACCOUNT_LIMIT_TESTER_EXEC_TIMEOUT |
Tester script execution time limit (in seconds). Default: 300 | |
ACCOUNT_LIMIT_REPORT_MAX_SIZE |
Maximum report file size (in MB). Default: 1 | |
ACCOUNT_LIMIT_ORDER_BOOK |
Defines the number of order book rows to load. Default: 5 |
Build the project:
yarn build:prodRun in production mode:
yarn start:prodDetailed documentation is available at docs.jt-lab.com.
JT Trader is dual-licensed:
- π’ Free for personal, educational, and open-source use (AGPLv3)
- π Commercial use requires a paid license
- jt-lib - Library for creating trading strategies
- Documentation - Complete project documentation
JT Lab - Professional tools for algorithmic trading