QuantDinger
Next-Gen AI Quantitative Trading Platform
🤖 AI-Native · 🐍 Visual Python · 🌍 Multi-Market · 🔒 Privacy-First
Build, Backtest, and Trade with an AI Co-Pilot. Better than PineScript, Smarter than SaaS.
📑 Table of Contents
- 🚀 Quick Start (2 Minutes)
- 📖 Introduction
- 📸 Visual Tour
- ✨ Key Features
- 🔌 Supported Exchanges & Brokers
- 🏗️ Architecture & Configuration
- 📚 Documentation Index
- 💼 License & Commercial
- 🤝 Community & Support
🚀 Quick Start (2 Minutes)
Only need: Docker installed. Nothing else.
# 1. Clone
git clone https://github.com/brokermr810/QuantDinger.git
cd QuantDinger
# 2. Configure (edit admin password & AI API key)
cp backend_api_python/env.example backend_api_python/.env
# 3. Launch!
docker-compose up -d --build
Windows PowerShell: use
Copy-Item backend_api_python\env.example -Destination backend_api_python\.env
🎉 Done! Open http://localhost:8888 | Login: quantdinger / 123456
📝 Key settings in backend_api_python/.env
# Required — Change for production!
ADMIN_USER=quantdinger
ADMIN_PASSWORD=your_secure_password
SECRET_KEY=your_random_secret_key
# Optional — Enable AI features (pick one)
OPENROUTER_API_KEY=your_key # Recommended: 100+ models
OPENAI_API_KEY=your_key # GPT-4o
DEEPSEEK_API_KEY=your_key # Cost-effective
GOOGLE_GEMINI_API_KEY=your_key # Gemini
🔧 Common Docker Commands
docker-compose ps # View service status
docker-compose logs -f backend # View backend logs (real-time)
docker-compose restart backend # Restart backend only
docker-compose up -d --build # Rebuild & restart all
docker-compose down # Stop all services
Update to latest version:
git pull && docker-compose up -d --build
Backup & Restore database:
docker exec quantdinger-db pg_dump -U quantdinger quantdinger > backup.sql
cat backup.sql | docker exec -i quantdinger-db psql -U quantdinger quantdinger
Custom port — create .env in project root:
FRONTEND_PORT=3000 # Default: 8888
BACKEND_PORT=127.0.0.1:5001 # Default: 5000
📖 Introduction
QuantDinger is a self-hosted, privacy-first AI quantitative trading platform. Your strategies, API keys, and trading data stay on your own machine — not in someone else's cloud.
| 🔒 Privacy-First | Your API keys, strategies, and data never leave your server |
| 🐍 Python-Native | Write indicators in Python, visualize on K-line charts with AI assistance |
| 🤖 AI Co-Pilot | Multi-agent analysis, backtest optimization, trading radar |
| 🌍 Multi-Market | Crypto (10+ exchanges), US Stocks (IBKR), Forex (MT5) |
| 💳 Monetization-Ready | Membership, credits, USDT on-chain payment — all built-in |
| ⚡ One-Click Deploy | docker-compose up -d — production-ready in 2 minutes |
📺 Video Demo
📸 Visual Tour
✨ Key Features
🐍 Visual Python Strategy Workbench
Write indicators in Python (not PineScript), run them on built-in K-line charts, and let AI write the complex logic for you. Full Python ecosystem: Pandas, Numpy, TA-Lib.
📈 Complete Trading Lifecycle
Indicator → Strategy → Backtest → AI Optimize → Live Trade / Signal Notify
- Simplified strategy creation with smart defaults (15min K-line, 5x leverage, market order)
- AI analyzes backtest results and suggests parameter improvements
- Live trading on Crypto (10+ exchanges), US Stocks (IBKR), Forex (MT5)
- Signal notifications via Telegram, Discord, Email, SMS, Webhook
🤖 AI-Powered Analysis
- Multi-Agent Analysis: 5 parallel analysts + bull/bear debate + final trading decision
- AI Trading Radar: Auto-scans Crypto/Stocks/Forex markets hourly
- Quick Trade Panel (⚡): One-click trade from any analysis signal
- Memory-Augmented: RAG-style local memory — agents learn from past analyses
💳 Built-in Monetization
- Membership Plans: Monthly / Yearly / Lifetime with credits
- USDT On-Chain Payment: TRC20 scan-to-pay, HD Wallet address derivation, auto-reconciliation
- Indicator Marketplace: Publish, buy, and sell Python indicators with credits
🔐 User Management & Security
- Multi-user with PostgreSQL, role-based permissions
- Google & GitHub OAuth, email verification
- Cloudflare Turnstile captcha, rate limiting, demo mode
🧠 Multi-LLM Support
| Provider | Models |
|---|---|
| OpenRouter | 100+ models (recommended) |
| OpenAI | GPT-4o, GPT-4o-mini |
| Google Gemini | Gemini 1.5 Flash/Pro |
| DeepSeek | DeepSeek Chat |
| xAI Grok | Grok Beta |
🔄 Memory-Augmented Agent Architecture (Click to expand)
flowchart TB
subgraph Entry["🌐 API Entry"]
A["📡 POST /api/analysis/multi"]
A2["🔄 POST /api/analysis/reflect"]
end
subgraph Service["⚙️ Service Orchestration"]
B[AnalysisService]
C[AgentCoordinator]
D["📊 Build Context<br/>price · kline · news · indicators"]
end
subgraph Agents["🤖 Multi-Agent Workflow"]
subgraph P1["📈 Phase 1 · Analysis (Parallel)"]
E1["🔍 MarketAnalyst"]
E2["📑 FundamentalAnalyst"]
E3["📰 NewsAnalyst"]
E4["💭 SentimentAnalyst"]
E5["⚠️ RiskAnalyst"]
end
subgraph P2["🎯 Phase 2 · Debate"]
F1["🐂 BullResearcher"]
F2["🐻 BearResearcher"]
end
subgraph P3["💹 Phase 3 · Decision"]
G["🎰 TraderAgent → BUY / SELL / HOLD"]
end
end
subgraph Memory["🧠 PostgreSQL Memory Store"]
M1[("agent memories")]
end
subgraph Reflect["🔄 Reflection Loop"]
R[ReflectionService]
W["⏰ ReflectionWorker"]
end
A --> B --> C --> D
D --> P1 --> P2 --> P3
Agents <-.-> M1
C --> R
W -.->|"verify + learn"| M1
🔌 Supported Exchanges & Brokers
Cryptocurrency (Direct API Trading)
| Exchange | Markets |
|---|---|
| Binance | Spot, Futures, Margin |
| OKX | Spot, Perpetual, Options |
| Bitget | Spot, Futures, Copy Trading |
| Bybit | Spot, Linear Futures |
| Coinbase | Spot |
| Kraken | Spot, Futures |
| KuCoin | Spot, Futures |
| Gate.io | Spot, Futures |
| Bitfinex | Spot, Derivatives |
Traditional Brokers & Markets
| Market | Broker/Source | Trading |
|---|---|---|
| US Stocks | Interactive Brokers (IBKR), Yahoo Finance, Finnhub | ✅ Via IBKR |
| Forex | MetaTrader 5 (MT5), OANDA | ✅ Via MT5 |
| Futures | Exchange APIs | ⚡ Data + Notify |
🏗️ Architecture & Configuration
┌─────────────────────────────────────┐
│ Docker Compose │
│ │
│ ┌───────────────────────────────┐ │
│ │ frontend (Nginx) → :8888 │ │
│ └──────────────┬────────────────┘ │
│ │ /api/* proxy │
│ ┌──────────────▼────────────────┐ │
│ │ backend (Flask) → :5000 │ │
│ └──────────────┬────────────────┘ │
│ ┌──────────────▼────────────────┐ │
│ │ postgres (PG 16) → :5432 │ │
│ └───────────────────────────────┘ │
│ │
│ External: LLM APIs · Exchanges · │
│ TronGrid · Data providers │
└─────────────────────────────────────┘
Repository Layout
QuantDinger/
├── backend_api_python/ # 🐍 Backend (Open Source, Apache 2.0)
│ ├── app/routes/ # API endpoints
│ ├── app/services/ # Business logic (AI, trading, payment)
│ ├── migrations/init.sql # Database schema
│ ├── env.example # ⚙️ Config template → copy to .env
│ └── Dockerfile
├── frontend/ # 🎨 Frontend (Pre-built)
│ ├── dist/ # Static files (HTML/JS/CSS)
│ ├── Dockerfile # Nginx image
│ └── nginx.conf # SPA routing + API proxy
├── docs/ # 📚 Guides & tutorials
├── docker-compose.yml # 🐳 One-click deployment
└── LICENSE # Apache 2.0
⚙️ Configuration Reference (.env)
Use backend_api_python/env.example as template:
| Category | Key Variables |
|---|---|
| Auth | SECRET_KEY, ADMIN_USER, ADMIN_PASSWORD |
| Database | DATABASE_URL (PostgreSQL connection string) |
| AI / LLM | LLM_PROVIDER, OPENROUTER_API_KEY, OPENAI_API_KEY |
| OAuth | GOOGLE_CLIENT_ID, GITHUB_CLIENT_ID |
| Security | TURNSTILE_SITE_KEY, ENABLE_REGISTRATION |
| Membership | MEMBERSHIP_MONTHLY_PRICE_USD, MEMBERSHIP_MONTHLY_CREDITS |
| USDT Payment | USDT_PAY_ENABLED, USDT_TRC20_XPUB, TRONGRID_API_KEY |
| Proxy | PROXY_PORT or PROXY_URL |
| Workers | ENABLE_PENDING_ORDER_WORKER, ENABLE_PORTFOLIO_MONITOR |
🔌 API Endpoints
| Endpoint | Description |
|---|---|
GET /api/health |
Health check |
POST /api/user/login |
User authentication |
GET /api/user/info |
Current user info |
GET /api/billing/plans |
Membership plans |
POST /api/billing/usdt/create-order |
Create USDT payment order |
For the full route list, see backend_api_python/app/routes/.
📚 Documentation Index
All detailed guides are in the docs/ folder:
Getting Started
| Document | Description |
|---|---|
| Changelog | Version history & migration notes |
| Multi-User Setup | PostgreSQL multi-user deployment |
Strategy Development
| Guide | 🇺🇸 EN | 🇨🇳 CN | 🇹🇼 TW | 🇯🇵 JA | 🇰🇷 KO |
|---|---|---|---|---|---|
| Strategy Dev | EN | CN | TW | JA | KO |
| Cross-Sectional | EN | CN | |||
| Code Examples | examples/ |
Broker & Integration
| Guide | English | 中文 |
|---|---|---|
| IBKR (US Stocks) | Guide | — |
| MT5 (Forex) | Guide | 指南 |
| OAuth (Google/GitHub) | Guide | 指南 |
Notifications
| Channel | English | 中文 |
|---|---|---|
| Telegram | Setup | 配置 |
| Email (SMTP) | Setup | 配置 |
| SMS (Twilio) | Setup | 配置 |
💼 License & Commercial
Open Source License
Backend source code is licensed under Apache License 2.0. See LICENSE.
The frontend UI is provided as pre-built files. Trademark rights (name/logo/branding) are governed separately — see TRADEMARKS.md.
🎓 Free Source Code for Non-Profit & Education
If you are a university, research institution, non-profit, community group, or educational program, you can apply for free authorization and full frontend source code:
- 🏫 Universities & academic research
- 🌍 Open-source communities & developer groups
- 🤝 Non-profit & public welfare organizations
- 📚 Educational programs & student hackathons
💼 Commercial License
For commercial use, purchase a license to get:
- Full frontend source code + future updates
- Branding authorization — modify name/logo/copyright as agreed
- Operations support — deployment, upgrades, incident response
- Consulting — architecture review, performance tuning
📬 Contact
| Channel | Link |
|---|---|
| Telegram | t.me/worldinbroker |
| brokermr810@gmail.com |
🤝 Community & Support
💝 Support the Project
Crypto Donations (ERC-20 / BEP-20 / Polygon / Arbitrum)
0x96fa4962181bea077f8c7240efe46afbe73641a7
🎓 Supporting Partners
💡 Want to become a partner? Contact brokermr810@gmail.com or Telegram.
Acknowledgements
| Project | Link |
|---|---|
| Flask | flask.palletsprojects.com |
| Pandas | pandas.pydata.org |
| CCXT | github.com/ccxt/ccxt |
| yfinance | github.com/ranaroussi/yfinance |
| Vue.js | vuejs.org |
| Ant Design Vue | antdv.com |
| KlineCharts | github.com/klinecharts/KLineChart |
| ECharts | echarts.apache.org |
Thanks to all maintainers and contributors! ❤️






