Skip to content

jt-lab-com/jt-trader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

280 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JT Trader

License TypeScript Node.js CCXT JT-Lib

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.

πŸ“‹ Table of Contents

πŸš€ Key Features

  • 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

πŸ–ΌοΈ Screenshots

Runtime Interface Create Runtime Tester Interface Tester Report Strategy Files Configuration Create Scenario Tester

πŸ“‹ Requirements

  • Node.js v18.x (not tested yet on other versions)

πŸ›  Installation

1. πŸ“₯ Download Launcher

2. 🐳 Docker Installation

πŸ“¦ From GitHub

  1. Clone the repository:
git clone --recurse-submodules git@github.com:jt-lab-com/jt-trader.git

Go to the project directory and install dependencies:

  1. Install dependencies:
cd jt-trader && yarn
  1. Configure environment variables by copying .env.example to .env.

βš™οΈ Configuration

Automatic configuration

Run the following command to automatically generate a .env file with all required environment variables:

ts-node scripts/setup-environment.ts

Manual configuration

Create 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

Environment Variables

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

πŸš€ Running

Build the project:

yarn build:prod

Run in production mode:

yarn start:prod

πŸ“š Documentation

Detailed documentation is available at docs.jt-lab.com.

πŸ“„ License

JT Trader is dual-licensed:

  • 🟒 Free for personal, educational, and open-source use (AGPLv3)
  • πŸ”’ Commercial use requires a paid license

🀝 Support

πŸ”— Related Projects

  • jt-lib - Library for creating trading strategies
  • Documentation - Complete project documentation

JT Lab - Professional tools for algorithmic trading

About

JT-Trader

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors