AI Trading Simulator is an LLM-powered crypto paper trading platform. Users define trading strategies via custom prompts; the system then aggregates live market data, evaluates 15+ technical indicators, and executes trades automatically—all without risking real capital. The platform includes a robust authentication layer featuring Linux DO OAuth support and isolated data environments for every account.
The AI core utilizes a five-stage response parser designed to interpret everything from structured JSON to messy Markdown and plain-text reasoning. Trades are triggered every three minutes, supporting both long and short positions with up to 20x leverage. To ensure reliability, failed AI calls trigger an automatic retry loop (up to three attempts). Comprehensive risk controls—including stop-loss, take-profit, position sizing, and drawdown alerts—run continuously in the background. Performance is tracked via Sharpe, Sortino, and Calmar ratios, supported by a backtesting engine for historical validation.
The tech stack consists of Python/Flask and SQLite. The AI interface is compatible with any OpenAI-standard endpoint (OpenAI, DeepSeek, Claude, Kimi). The application can be deployed quickly via Docker and is accessible at trade.easy2ai.com. This is an educational tool for experimentation; AI-generated outputs do not constitute investment advice, and users assume all risk for real-world financial decisions.
The project is built upon the chadyi/AITradeGame codebase, adding a dedicated user system, Linux DO OAuth integration, and an intelligent response parser.
reasoning field logs the AI’s logic for every execution.POST /api/backtest providing return, win rate, and risk metrics.| Category | Technology |
|---|---|
| Backend | Python 3.9+, Flask 3.0 |
| Frontend | Vanilla JavaScript, ECharts 5.4.3 |
| Database | SQLite |
| AI Interface | OpenAI-compatible (OpenAI, DeepSeek, Claude, Kimi) |
| OAuth | Linux DO Connect OAuth 2.0 |
| Real-time | WebSocket (Flask-SocketIO) |
| Rate Limiting | Flask-Limiter |
| Deployment | Docker, Docker Compose, Gunicorn |
Option 1: Local Setup
git clone https://github.com/yourusername/AITradeGame.git && cd AITradeGamepip install -r requirements.txtcp .env.example .env and update the SECRET_KEY.python app.pyhttp://localhost:35008Option 2: Docker (Recommended)
.env.example to .env and configure SECRET_KEY, LINUX_DO_CLIENT_ID, etc.docker-compose up -ddocker-compose logs -fhttp://localhost:35008docker-compose downAccount Creation
Model Creation Click "Add Model" and configure:
https://api.deepseek.com), model ID (e.g., deepseek-chat), and initial capital."Focus on steady gains. Buy only when RSI < 30 and sell when RSI > 70. Maintain risk per trade below 1% using 3x leverage. Prioritize strict stop-loss discipline." If left empty, the platform applies a default professional trading prompt.
Monitoring The system executes trades every three minutes based on AI analysis and live data. Users can monitor portfolio health, review trade logs, inspect AI reasoning, and compare performance on the leaderboard.
Environment Variables (.env)
SECRET_KEY (Generate via python -c "import secrets; print(secrets.token_hex(32))")HOST, PORT, DEBUGDATABASE_PATHLINUX_DO_CLIENT_ID, LINUX_DO_CLIENT_SECRET, LINUX_DO_REDIRECT_URIAUTO_TRADING=True, TRADING_INTERVAL=180Core Parameters (config.py)
['BTC', 'ETH', 'SOL', 'BNB', 'XRP', 'DOGE']MAX_RISK_PER_TRADE=0.05, MAX_POSITION_RATIO=0.30, MAX_LEVERAGE=20, MAX_DRAWDOWN_WARNING=0.15Authentication (Login Required for some)
POST /api/auth/register, POST /api/auth/login, POST /api/auth/logout, GET /api/auth/meModel Management (Login Required)
GET /api/models, POST /api/models, DELETE /api/models/<id>Trading & Analytics (Login Required)
GET /api/models/<id>/portfolio, GET /api/models/<id>/trades, GET /api/models/<id>/performance, POST /api/backtestPublic Data
GET /api/market/prices, GET /api/leaderboard, GET /api/dashboard/performance-chart
ETF Grid Trading Strategy Design Tool: Smart Parameters & Risk Control
Index-TTS-LoRA: Fine-Tuning Voice Models for Natural Speech Synthesis
Any-LLM Review: A Unified Python Interface for Every AI Model
OpenHands: The AI Agent That Writes Code and Executes Commands
Agentic-Trading: Multi-Agent Simulator with A2A Protocol and ADK
Turso Database: A Rust-Based SQLite-Compatible Engine
Scira: The Minimalist AI Search Engine for Grok, Claude, and Beyond
n8n-MCP: Give Claude Access to 525+ n8n Nodes in Minutes
Graph-Code: Query Your Codebase via Natural Language with LLM-Powered RAG
TensorZero: Optimize LLM Applications with Production Feedback
QSV: Slice, Query, and Clean Massive CSV Files with High Performance
Muscle Memory: Cache AI Agent Actions to Cut LLM Costs and Latency