Vibe Coding Meets Algo Trading
🌐 Live Demo · 📺 Video · 💬 Community · 🚀 Quick Start
7 AI Agents · Python Strategies · 10+ Exchanges · Prediction Markets · Your Server, Your Keys
Describe your trading idea in natural language → AI writes the Python strategy → Backtest → Live trade.
Zero coding required. Self-hosted — your API keys and strategies never leave your machine.
🇺🇸 English · 🇨🇳 简体中文 · 🇹🇼 繁體中文 · 🇯🇵 日本語 · 🇰🇷 한국어 · 🇩🇪 Deutsch · 🇫🇷 Français · 🇹🇭 ไทย · 🇻🇳 Tiếng Việt · 🇸🇦 العربية
- 🚀 Quick Start (2 Minutes)
- 🎯 Why QuantDinger?
- 📸 Visual Tour
- ✨ Key Features
- 🔌 Supported Exchanges & Brokers
- 🏗️ Architecture & Configuration
- 📚 Documentation Index
- 💼 License & Commercial
- 🤝 Community & Support
Only need: Docker installed. Nothing else.
# 1. Clone
git clone https://github.com/brokermr810/QuantDinger.git
cd QuantDinger
# 2. Copy backend config
cp backend_api_python/env.example backend_api_python/.env
# 3. Generate and write a secure SECRET_KEY
./scripts/generate-secret-key.sh
# 4. Launch!
docker-compose up -d --buildLinux/macOS:
- Copy backend config:
cp backend_api_python/env.example backend_api_python/.env- Need more knobs? Scroll to the lower "Advanced / rarely changed" section inside:
backend_api_python/env.example- Optional: if Docker Hub is slow/unreachable in your network, copy root Docker config:
cp .env.example .env- Generate and write
SECRET_KEY:./scripts/generate-secret-key.sh- Launch:
docker-compose up -d --build
Windows PowerShell:
- Copy backend config:
Copy-Item backend_api_python\env.example -Destination backend_api_python\.env- Need more knobs? Scroll to the lower "Advanced / rarely changed" section inside:
backend_api_python\env.example- Optional: if Docker Hub is slow/unreachable in your network, copy root Docker config:
Copy-Item .env.example -Destination .env- Generate and write
SECRET_KEY:$key = py -c "import secrets; print(secrets.token_hex(32))"(Get-Content backend_api_python\.env) -replace '^SECRET_KEY=.*$', "SECRET_KEY=$key" | Set-Content backend_api_python\.env -Encoding UTF8- Launch:
docker-compose up -d --build
⚠️ Security Note: The container will NOT start ifSECRET_KEYis using the default value. This prevents insecure deployments.
🎉 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 # ⚠️ MUST change! Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"
# 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🔐 Generate SECRET_KEY (Required for Docker)
Before starting Docker, you MUST set a secure SECRET_KEY:
# Option 1: Use helper script (Linux/Mac)
./scripts/generate-secret-key.sh
# Option 2: Use helper script (Windows PowerShell)
.\scripts\generate-secret-key.ps1
# Option 3: Manual generation
python3 -c "import secrets; print(secrets.token_hex(32))"
# Then edit backend_api_python/.env and replace SECRET_KEY value🔧 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 servicesUpdate to latest version:
git pull && docker-compose up -d --buildBackup & Restore database:
docker exec quantdinger-db pg_dump -U quantdinger quantdinger > backup.sql
cat backup.sql | docker exec -i quantdinger-db psql -U quantdinger quantdingerCustom port — create .env in project root:
FRONTEND_PORT=3000 # Default: 8888
BACKEND_PORT=127.0.0.1:5001 # Default: 5000Alternative image sources — Default uses Docker Hub. If pulling base images fails in your region/network, copy .env.example to .env and change one line:
IMAGE_PREFIX=docker.m.daocloud.io/library/Other common choices:
IMAGE_PREFIX=
IMAGE_PREFIX=docker.xuanyuan.me/library/Docker troubleshooting
1. Image source switching is controlled by the project-root `.env`, not `backend_api_python/.env`.
2. The open-source repo ships prebuilt frontend files in `frontend/dist`, so frontend deployment does not require Node.js.
3. On Windows, if backend logs show:
exec /usr/local/bin/docker-entrypoint.sh: no such file or directory
it is usually caused by shell/line-ending compatibility in the image layer. Rebuild the backend image with:
docker-compose build --no-cache backend
4. If frontend logs show:
host not found in upstream "backend"
it usually means the backend container failed first. Fix backend, then restart frontend:
docker-compose restart frontend
5. If frontend build fails with:
COPY frontend/dist ... not found
check `.dockerignore` and make sure `frontend/dist` is NOT excluded from the Docker build context.
6. If saving settings from the admin panel fails with:
Read-only file system: '/app/.env'
make sure `backend_api_python/.env` is mounted read-write in `docker-compose.yml`.
7. For Docker deployments, a local proxy must use `host.docker.internal`, not `127.0.0.1`.
Example:
PROXY_URL=socks5h://host.docker.internal:10808
8. If exchange logs say a symbol is "not found" after proxy/network fixes, it may be a market-symbol mapping issue
on that exchange (for example, renamed tokens), not a general network failure.
Vibe Coding for Trading — Describe your trading idea in plain English (or any language). AI writes the Python strategy, backtests it, and deploys it to live markets. No manual coding. No SaaS lock-in. Everything runs on your own server.
| 🎵 Vibe Coding | Describe ideas in natural language → AI generates production-ready Python strategies |
| 🔒 100% Self-Hosted | API keys & strategies never leave your server — privacy by design |
| 🤖 7 AI Agents | Multi-agent research team: parallel analysis → debate → trade decision |
| 🐍 Python-Native | Full ecosystem (Pandas, NumPy, TA-Lib, scikit-learn) — no proprietary language limits |
| 📊 Professional Charts | K-line charts with Python indicators, real-time visualization |
| 🌍 Crypto + Stocks + Forex | 10+ exchanges, IBKR, MT5 — all in one platform |
| 📊 Prediction Markets | On-demand AI analysis for Polymarket — probability divergence, opportunity scoring |
| 💰 Monetization-Ready | Membership, credits, USDT on-chain payment — built-in |
| ⚡ 2-Minute Deploy | docker-compose up -d — production-ready, zero build |
📸 Visual Tour | 📺 Watch Video Demo
|
|
📊 Professional Quant Dashboard |
|
![]() 🤖 AI Deep Research |
![]() 💬 Smart Trading Assistant |
![]() 📈 Indicator Analysis |
![]() 🐍 AI Strategy Coding |
![]() 📊 Portfolio Monitor |
|
No coding required. Tell AI what you want in natural language — it generates production-ready Python strategies. Or write your own with the full Python ecosystem (Pandas, NumPy, TA-Lib, scikit-learn). Visualize everything on professional K-line charts.
💬 "I want a MACD crossover strategy with RSI filter on BTC 15min"
↓ AI generates Python code
↓ 📈 Visualize on K-line charts
↓ 🔄 Backtest with rich metrics
↓ 🤖 AI suggests optimizations
↓ 🚀 One-click deploy to live trading
Not just one AI call. QuantDinger deploys 7 specialized agents that collaborate like a research team — analyze, debate, and reach consensus:
Phase 1 (Parallel): 📊 Technical · 📑 Fundamental · 📰 News · 💭 Sentiment · ⚠️ Risk
Phase 2 (Debate): 🐂 Bull vs 🐻 Bear — structured argumentation
Phase 3 (Decision): 🎯 TraderAgent → BUY / SELL / HOLD (with confidence %)
- 🎵 Natural Language Analysis — Ask "Analyze BTC trend for next week" → 7 agents deliver a full report
- 📡 AI Trading Radar — Auto-scans Crypto/Stocks/Forex hourly, surfaces opportunities
- ⚡ Quick Trade Panel — See a signal? One-click to execute. No page switching.
- 🧠 Memory-Augmented — Agents learn from past analyses (local RAG, not cloud)
- 🔌 5+ LLM Providers: OpenRouter (100+ models), OpenAI, Gemini, DeepSeek, Grok
- 📊 Polymarket Prediction Markets — On-demand AI analysis for prediction markets. Input a market link or title → AI analyzes probability divergence, opportunity score, and trading recommendations. Full history tracking and billing integration.
- 📋 Virtual Position Tracking — Create virtual positions directly from your watchlist with long/short direction, quantity, and entry price. Real-time PnL calculation without connecting to a real exchange.
| Step | What Happens |
|---|---|
| 1. 💬 Describe | Tell AI your trading idea in natural language — or write Python directly |
| 2. 🤖 Generate | AI creates the indicator & strategy code for you |
| 3. 📊 Visualize | See signals on professional K-line charts instantly |
| 4. 🔄 Backtest | Rich metrics + AI analyzes results & suggests improvements |
| 5. 🚀 Execute | Live trade on 10+ crypto exchanges, IBKR (stocks), MT5 (forex) |
| 6. 📡 Monitor | Portfolio tracker, alerts via Telegram/Discord/Email/SMS/Webhook |
On-demand AI analysis for prediction markets. Input a Polymarket link or market title → AI analyzes probability divergence, opportunity score, and provides trading recommendations.
Features:
- 🔍 Smart Search — Supports market links, slugs, or natural language titles
- 🤖 AI Probability Prediction — Compares AI-predicted probability vs market probability
- 📈 Opportunity Scoring — Calculates opportunity score based on divergence and confidence
- 💡 Trading Recommendations — YES/NO/HOLD with detailed reasoning and key factors
- 📚 History Tracking — View all your past analyses with full details in a dedicated history tab
- 💰 Billing Integration — Configurable credit consumption per analysis (set via
BILLING_COST_POLYMARKET_DEEP_ANALYSIS) - 🌍 Multi-Language — AI responses match your frontend language (English/Chinese)
- 📊 Admin Statistics — All analyses tracked in user management dashboard
Usage:
1. Navigate to AI Asset Analysis → Prediction Markets tab
2. Input Polymarket link or market title
3. AI analyzes and returns:
- Market probability vs AI-predicted probability
- Divergence analysis
- Opportunity score (0-100)
- Trading recommendation (YES/NO/HOLD)
- Detailed reasoning and key factors
4. View analysis history anytime
Most open-source projects need months of custom billing work. QuantDinger ships with a complete monetization system out of the box:
- 💳 Membership Plans — Monthly / Yearly / Lifetime tiers with configurable pricing & credits
- ₿ USDT On-Chain Payment — TRC20 scan-to-pay, HD Wallet (xpub) per-order addresses, auto-reconciliation via TronGrid
- 🏪 Indicator Marketplace — Users publish & sell Python indicators, you take commission
- ⚙️ Admin Dashboard — Order management, AI usage stats, user analytics; settings hot-reload without server restart
- Multi-User — PostgreSQL-backed accounts with role-based permissions
- OAuth — Google & GitHub one-click login
- Protection — Cloudflare Turnstile, IP/account rate limiting, email verification
- Demo Mode — Read-only mode for public showcases
🧠 AI Analysis Architecture (Click to expand)
Uses FastAnalysisService single-LLM flow for speed and multi-factor decisions:
flowchart TB
subgraph Entry["🌐 API Entry"]
A["📡 POST /api/fast-analysis/analyze"]
A2["📜 GET /api/fast-analysis/history"]
A3["📊 GET /api/fast-analysis/similar-patterns"]
end
subgraph Data["📊 Data Layer"]
D1[MarketDataCollector]
D2["Price · Kline · Macro · News · Fundamentals"]
D3["Multi-TF Consensus 1D / 4H / 1H"]
end
subgraph Analysis["⚙️ Analysis Layer"]
B["FastAnalysisService"]
C["Single LLM Call<br/>Constrained Prompt"]
E["Objective Score + Multi-TF Consensus"]
F["AICalibration Threshold Tuning"]
G["BUY / SELL / HOLD"]
end
subgraph Memory["🧠 Memory Layer"]
M1[("qd_analysis_memory<br/>PostgreSQL")]
M2["RAG Similar-Pattern Retrieval<br/>(optional prompt injection)"]
end
A --> B
B --> D1 --> D2 --> D3
D3 --> C --> E --> F --> G
B -.->|"store"| M1
M1 -.->|"similar patterns"| M2
M2 -.->|"optional context"| C
A2 --> M1
A3 --> M1
Flow: Data collection → Multi-timeframe consensus → Single LLM call → Calibration override → Store in memory.
| 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 |
| 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 |
If you are opening a new exchange account, use a rebate link from the start. Many traders actively look for fee-rebate links anyway, and these links give you a straightforward 20% trading fee discount at no extra cost.
- OKX: Open account with 20% fee rebate
- Bitget: Open account with 20% fee rebate
- Bitget (backup link): Alternate 20% fee rebate signup link
| Layer | Technology |
|---|---|
| AI Engine | 7-Agent Multi-Agent System · RAG Memory · 5+ LLM Providers · Vibe Coding (NL→Python) |
| Backend | Python 3.10+ · Flask · PostgreSQL 16 · Redis (optional) |
| Frontend | Vue.js · Ant Design · KlineCharts · ECharts |
| Payment | USDT TRC20 On-Chain · HD Wallet (BIP-32/44) · TronGrid API |
| Mobile | Vue 3 + Capacitor (Android / iOS) |
| Deploy | Docker Compose · Nginx · Zero-build one-click |
┌─────────────────────────────────────┐
│ Docker Compose │
│ │
│ ┌───────────────────────────────┐ │
│ │ frontend (Nginx) → :8888 │ │
│ └──────────────┬────────────────┘ │
│ │ /api/* proxy │
│ ┌──────────────▼────────────────┐ │
│ │ backend (Flask) → :5000 │ │
│ └──────────────┬────────────────┘ │
│ ┌──────────────▼────────────────┐ │
│ │ postgres (PG 16) → :5432 │ │
│ └───────────────────────────────┘ │
│ │
│ External: LLM APIs · Exchanges · │
│ TronGrid · Data providers │
└─────────────────────────────────────┘
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 the simplified template.
The upper part is for first-time deployment, and the lower "Advanced / rarely changed" section contains optional tuning.
| 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_URL |
| Billing | BILLING_ENABLED, BILLING_COST_AI_ANALYSIS, BILLING_COST_AI_CODE_GEN |
| Workers | ENABLE_PENDING_ORDER_WORKER, ENABLE_PORTFOLIO_MONITOR, ENABLE_REFLECTION_WORKER |
| AI Tuning | ENABLE_AI_ENSEMBLE, ENABLE_CONFIDENCE_CALIBRATION, AI_ENSEMBLE_MODELS |
🔌 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/.
All detailed guides are in the docs/ folder:
| Document | Description |
|---|---|
| Changelog | Version history & migration notes |
| Multi-User Setup | PostgreSQL multi-user deployment |
| Cloud Deployment | Cloud server deployment with domain, HTTPS, and reverse proxy |
| Guide | 🇺🇸 EN | 🇨🇳 CN | 🇹🇼 TW | 🇯🇵 JA | 🇰🇷 KO |
|---|---|---|---|---|---|
| Strategy Dev | EN | CN | TW | JA | KO |
| Cross-Sectional | EN | CN | |||
| Code Examples | examples/ |
| Guide | English | 中文 |
|---|---|---|
| IBKR (US Stocks) | Guide | — |
| MT5 (Forex) | Guide | 指南 |
| OAuth (Google/GitHub) | Guide | 指南 |
| Channel | English | 中文 |
|---|---|---|
| Telegram | Setup | 配置 |
| Email (SMTP) | Setup | 配置 |
| SMS (Twilio) | Setup | 配置 |
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.
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
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
| Channel | Link |
|---|---|
| Telegram | t.me/worldinbroker |
| brokermr810@gmail.com |
Crypto Donations (ERC-20 / BEP-20 / Polygon / Arbitrum)
0x96fa4962181bea077f8c7240efe46afbe73641a7
💡 Want to become a partner? Contact brokermr810@gmail.com or Telegram.
Built with ❤️ on the shoulders of: Flask · Pandas · CCXT · yfinance · Vue.js · Ant Design Vue · KlineCharts · ECharts · Capacitor · bip-utils
If QuantDinger helps you, consider ⭐ starring the repo — it means a lot!






