2025-12-29 03:06:49 +08:00
<div align="center">
2025-12-29 19:05:17 +08:00
<a href="https://github.com/brokermr810/QuantDinger">
<img src="https://ai.quantdinger.com/img/logo.e0f510a8.png" alt="QuantDinger Logo" width="160" height="160">
</a>
2026-02-27 20:29:59 +08:00
<h1>QuantDinger</h1>
<h3>AI-Native Quantitative Trading Platform</h3>
<p><strong>Vibe Coding Meets Algo Trading</strong></p>
2026-03-01 17:32:59 +08:00
<p>
2026-03-01 17:31:48 +08:00
<a href="docs/README_CN.md"><strong>🇨🇳 中文</strong></a> ·
2026-03-01 17:32:59 +08:00
<a href="README.md"><strong>🇺🇸 English</strong></a>
</p>
<p>
2026-02-27 20:29:59 +08:00
<a href="https://ai.quantdinger.com"><strong>🌐 Live Demo</strong></a> ·
<a href="https://youtu.be/HPTVpqL7knM"><strong>📺 Video</strong></a> ·
<a href="https://www.quantdinger.com"><strong>💬 Community</strong></a> ·
<a href="#-quick-start-2-minutes"><strong>🚀 Quick Start</strong></a>
2025-12-29 19:05:17 +08:00
</p>
2026-03-01 17:28:50 +08:00
<p>
2026-03-01 17:31:48 +08:00
<strong>7 AI Agents · Python Strategies · 10+ Exchanges · Prediction Markets · Your Server, Your Keys</strong>
</p>
<p>
<i>Describe your trading idea in natural language → AI writes the Python strategy → Backtest → Live trade.<br/>
Zero coding required. Self-hosted — your API keys and strategies never leave your machine.</i>
2026-03-01 17:28:50 +08:00
</p>
2026-02-27 20:29:59 +08:00
<p>
2025-12-29 19:05:17 +08:00
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square&logo=apache" alt="License"></a>
2026-03-01 17:20:37 +08:00
<img src="https://img.shields.io/badge/Version-2.2.3-orange?style=flat-square" alt="Version">
2025-12-29 19:05:17 +08:00
<img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python">
2026-02-27 20:29:59 +08:00
<img src="https://img.shields.io/badge/Docker-One%20Click-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker">
<img src="https://img.shields.io/badge/Vibe%20Coding-Ready-FF6B6B?style=flat-square&logo=sparkles&logoColor=white" alt="Vibe Coding">
2025-12-29 19:05:17 +08:00
<img src="https://img.shields.io/github/stars/brokermr810/QuantDinger?style=flat-square&logo=github" alt="Stars">
2025-12-29 03:06:49 +08:00
</p>
2025-12-29 19:05:17 +08:00
2026-02-27 20:29:59 +08:00
<p>
<a href="https://t.me/quantdinger"><img src="https://img.shields.io/badge/Telegram-Group-26A5E4?style=for-the-badge&logo=telegram" alt="Telegram"></a>
2026-03-17 20:30:04 +08:00
<a href="https://discord.com/invite/tyx5B6TChr"><img src="https://img.shields.io/badge/Discord-Server-5865F2?style=for-the-badge&logo=discord" alt="Discord"></a>
<a href="https://x.com/quantdinger_en"><img src="https://img.shields.io/badge/X-Follow-000000?style=for-the-badge&logo=x" alt="X"></a>
2025-12-29 19:05:17 +08:00
</p>
2026-02-27 20:07:06 +08:00
2026-03-01 17:20:37 +08:00
<sub>🇺🇸 <a href="README.md">English</a> · 🇨🇳 <a href="docs/README_CN.md">简体中文</a> · 🇹🇼 繁體中文 · 🇯🇵 日本語 · 🇰🇷 한국어 · 🇩🇪 Deutsch · 🇫🇷 Français · 🇹🇭 ไทย · 🇻🇳 Tiếng Việt · 🇸🇦 العربية</sub>
2025-12-29 19:05:17 +08:00
</div>
---
2026-02-27 20:07:06 +08:00
## 📑 Table of Contents
2026-01-04 02:41:38 +08:00
2026-02-27 20:07:06 +08:00
- [🚀 Quick Start (2 Minutes) ](#-quick-start-2-minutes )
2026-02-27 20:29:59 +08:00
- [🎯 Why QuantDinger? ](#-why-quantdinger )
- [📸 Visual Tour ](#-visual-tour--watch-video-demo )
2026-02-27 20:07:06 +08:00
- [✨ Key Features ](#-key-features )
- [🔌 Supported Exchanges & Brokers ](#-supported-exchanges--brokers )
- [🏗️ Architecture & Configuration ](#️ -architecture--configuration )
- [📚 Documentation Index ](#-documentation-index )
- [💼 License & Commercial ](#-license--commercial )
- [🤝 Community & Support ](#-community--support )
2026-01-04 02:41:38 +08:00
2026-02-27 20:07:06 +08:00
---
2026-01-04 02:41:38 +08:00
2026-02-27 20:07:06 +08:00
## 🚀 Quick Start (2 Minutes)
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
> **Only need**: [Docker](https://docs.docker.com/get-docker/) installed. Nothing else.
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
```bash
# 1. Clone
git clone https://github.com/brokermr810/QuantDinger.git
cd QuantDinger
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
# 2. Configure (edit admin password & AI API key)
cp backend_api_python/env.example backend_api_python/.env
2025-12-29 19:05:17 +08:00
2026-03-12 00:02:53 +08:00
# 3. IMPORTANT: Generate and set a secure SECRET_KEY
# Linux/Mac:
python3 -c "import secrets; print(secrets.token_hex(32))" | xargs -I {} sed -i 's|SECRET_KEY=.*|SECRET_KEY={}|' backend_api_python/.env
# Or manually edit backend_api_python/.env and replace SECRET_KEY value
# Windows PowerShell:
# $key = python -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
# 4. Launch!
2026-02-27 20:07:06 +08:00
docker-compose up -d --build
```
2025-12-29 19:05:17 +08:00
2026-03-12 00:02:53 +08:00
> **Windows PowerShell**:
> - Copy: `Copy-Item backend_api_python\env.example -Destination backend_api_python\.env`
> - Generate SECRET_KEY: `python -c "import secrets; print(secrets.token_hex(32))"` then edit `.env` manually
> **⚠️ Security Note**: The container will **NOT start** if `SECRET_KEY` is using the default value. This prevents insecure deployments.
2026-01-06 00:47:54 +08:00
2026-02-27 20:07:06 +08:00
🎉 **Done!** Open **http://localhost:8888** | Login: `quantdinger` / `123456`
2026-01-06 00:47:54 +08:00
2026-02-27 20:07:06 +08:00
<details>
<summary><b>📝 Key settings in backend_api_python/.env</b></summary>
2026-01-06 00:47:54 +08:00
2026-02-27 20:07:06 +08:00
```ini
# Required — Change for production!
ADMIN_USER = quantdinger
ADMIN_PASSWORD = your_secure_password
2026-03-12 00:02:53 +08:00
SECRET_KEY = your_random_secret_key # ⚠️ MUST change! Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
# 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
```
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
</details>
2026-02-27 19:57:23 +08:00
2026-03-12 00:02:53 +08:00
<details>
<summary><b>🔐 Generate SECRET_KEY (Required for Docker)</b></summary>
**Before starting Docker, you MUST set a secure SECRET_KEY:**
```bash
# Option 1: Use helper script (Linux/Mac)
./scripts/generate-secret-key.sh
# Option 2: Use helper script (Windows PowerShell)
.\s cripts\g enerate-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
```
** ⚠️ The container will NOT start if SECRET_KEY is using the default value!**
</details>
2026-02-27 20:07:06 +08:00
<details>
<summary><b>🔧 Common Docker Commands</b></summary>
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
```bash
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
```
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
**Update to latest version:**
```bash
git pull && docker-compose up -d --build
```
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
**Backup & Restore database:**
```bash
docker exec quantdinger-db pg_dump -U quantdinger quantdinger > backup.sql
cat backup.sql | docker exec -i quantdinger-db psql -U quantdinger quantdinger
```
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
**Custom port** — create `.env` in project root:
```ini
FRONTEND_PORT = 3000 # Default: 8888
BACKEND_PORT = 127.0.0.1:5001 # Default: 5000
```
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
</details>
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
---
2026-02-27 19:57:23 +08:00
2026-02-27 20:29:59 +08:00
## 🎯 Why QuantDinger?
2026-02-27 19:57:23 +08:00
2026-02-27 20:29:59 +08:00
> **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.
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
| | |
|---|---|
2026-02-27 20:29:59 +08:00
| 🎵 **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 |
2026-03-01 17:20:37 +08:00
| 📊 **Prediction Markets** | On-demand AI analysis for Polymarket — probability divergence, opportunity scoring |
2026-02-27 20:29:59 +08:00
| 💰 **Monetization-Ready** | Membership, credits, USDT on-chain payment — built-in |
| ⚡ **2-Minute Deploy** | `docker-compose up -d` — production-ready, zero build |
2026-02-27 19:57:23 +08:00
---
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
## 📸 Visual Tour | [📺 Watch Video Demo](https://youtu.be/HPTVpqL7knM)
2026-01-26 20:34:29 +08:00
<table align="center" width="100%">
2025-12-29 19:05:17 +08:00
<tr>
2026-02-27 20:29:59 +08:00
<td colspan="2" align="center">
<a href="https://youtu.be/HPTVpqL7knM"><img src="docs/screenshots/video_demo.png" alt="Video Demo" width="80%" style="border-radius: 8px;"></a>
2026-01-26 20:34:29 +08:00
</td>
2025-12-29 19:05:17 +08:00
</tr>
2026-01-12 23:10:47 +08:00
<tr>
2026-02-27 20:29:59 +08:00
<td colspan="2" align="center">
<img src="docs/screenshots/dashboard.png" alt="Dashboard" width="90%" style="border-radius: 8px;">
<br/><sub>📊 Professional Quant Dashboard</sub>
2026-01-26 20:34:29 +08:00
</td>
2026-01-12 23:10:47 +08:00
</tr>
2026-02-27 20:29:59 +08:00
<tr>
<td width="50%" align="center"><img src="docs/screenshots/ai_analysis1.png" alt="AI Analysis" style="border-radius: 6px;"><br/><sub>🤖 AI Deep Research</sub></td>
<td width="50%" align="center"><img src="docs/screenshots/trading_assistant.png" alt="Trading Assistant" style="border-radius: 6px;"><br/><sub>💬 Smart Trading Assistant</sub></td>
</tr>
<tr>
<td align="center"><img src="docs/screenshots/indicator_analysis.png" alt="Indicator Analysis" style="border-radius: 6px;"><br/><sub>📈 Indicator Analysis</sub></td>
<td align="center"><img src="docs/screenshots/indicator_creat_python_code.png" alt="Code Generation" style="border-radius: 6px;"><br/><sub>🐍 AI Strategy Coding</sub></td>
</tr>
<tr>
<td colspan="2" align="center"><img src="docs/screenshots/portfolio.jpg" alt="Portfolio Monitor" style="border-radius: 6px; max-width: 80%;"><br/><sub>📊 Portfolio Monitor</sub></td>
</tr>
2025-12-29 19:05:17 +08:00
</table>
2025-12-29 03:06:49 +08:00
---
2026-01-26 20:34:29 +08:00
## ✨ Key Features
2026-02-27 20:29:59 +08:00
### 🎵 Vibe Coding Strategy Workbench
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
> **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.
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
```
💬 "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
```
### 🤖 7-Agent AI Analysis Engine
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
> Not just one AI call. QuantDinger deploys **7 specialized agents** that collaborate like a research team — analyze, debate, and reach consensus:
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
```
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 %)
```
2026-02-27 01:57:04 +08:00
2026-02-27 20:29:59 +08:00
- **🎵 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
2026-03-01 17:20:37 +08:00
- **📊 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.
2026-02-27 01:57:04 +08:00
2026-02-27 20:29:59 +08:00
### 📈 Full Trading Lifecycle
2026-02-27 01:57:04 +08:00
2026-02-27 20:29:59 +08:00
| 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 |
2026-02-27 01:57:04 +08:00
2026-03-01 17:20:37 +08:00
### 📊 Polymarket Prediction Market Analysis
> **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
```
2026-02-27 20:29:59 +08:00
### 💰 Built-in Monetization
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
> Most open-source projects need months of custom billing work. QuantDinger ships with a **complete monetization system** out of the box:
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
- **💳 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
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
### 🔐 Enterprise-Grade Security
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
- **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
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
<details>
2026-02-27 20:29:59 +08:00
<summary><b>🧠 AI Agent Architecture Diagram (Click to expand)</b></summary>
2026-01-26 20:34:29 +08:00
```mermaid
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
2026-02-27 20:29:59 +08:00
subgraph Agents["🤖 7-Agent Workflow"]
subgraph P1["📈 Phase 1 · Parallel Analysis"]
2026-02-27 20:07:06 +08:00
E1["🔍 MarketAnalyst"]
E2["📑 FundamentalAnalyst"]
E3["📰 NewsAnalyst"]
E4["💭 SentimentAnalyst"]
E5["⚠️ RiskAnalyst"]
2026-01-26 20:34:29 +08:00
end
2026-02-27 20:29:59 +08:00
subgraph P2["🎯 Phase 2 · Bull vs Bear Debate"]
2026-02-27 20:07:06 +08:00
F1["🐂 BullResearcher"]
F2["🐻 BearResearcher"]
2026-01-26 20:34:29 +08:00
end
2026-02-27 20:29:59 +08:00
subgraph P3["💹 Phase 3 · Final Decision"]
2026-02-27 20:07:06 +08:00
G["🎰 TraderAgent → BUY / SELL / HOLD"]
2026-01-26 20:34:29 +08:00
end
end
2026-02-27 20:29:59 +08:00
subgraph Memory["🧠 Local Memory Store"]
M1[("Agent Memories (PostgreSQL)")]
2026-01-26 20:34:29 +08:00
end
2026-02-27 20:07:06 +08:00
subgraph Reflect["🔄 Reflection Loop"]
2026-01-26 20:34:29 +08:00
R[ReflectionService]
2026-02-27 20:29:59 +08:00
W["⏰ ReflectionWorker → verify + learn"]
2026-01-26 20:34:29 +08:00
end
A --> B --> C --> D
D --> P1 --> P2 --> P3
2026-02-27 20:29:59 +08:00
Agents <-.->|"RAG retrieval"| M1
2026-02-27 20:07:06 +08:00
C --> R
2026-02-27 20:29:59 +08:00
W -.->|"update memories"| M1
2026-01-26 20:34:29 +08:00
```
2026-02-27 20:07:06 +08:00
</details>
2026-01-26 20:34:29 +08:00
---
2026-01-13 04:01:42 +08:00
## 🔌 Supported Exchanges & Brokers
2025-12-29 19:05:17 +08:00
2026-02-27 20:07:06 +08:00
### Cryptocurrency (Direct API Trading)
2026-01-26 20:34:29 +08:00
| Exchange | Markets |
|:--------:|:---------|
| Binance | Spot, Futures, Margin |
| OKX | Spot, Perpetual, Options |
| Bitget | Spot, Futures, Copy Trading |
| Bybit | Spot, Linear Futures |
2026-02-27 20:07:06 +08:00
| Coinbase | Spot |
2026-01-26 20:34:29 +08:00
| Kraken | Spot, Futures |
| KuCoin | Spot, Futures |
| Gate.io | Spot, Futures |
| Bitfinex | Spot, Derivatives |
2025-12-29 19:18:42 +08:00
2026-02-27 20:07:06 +08:00
### Traditional Brokers & Markets
2026-01-13 04:01:42 +08:00
2026-02-27 20:07:06 +08:00
| 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 |
2025-12-29 03:06:49 +08:00
2025-12-29 19:05:17 +08:00
---
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
## 🏗️ Architecture & Configuration
2026-01-26 20:34:29 +08:00
2026-02-27 20:29:59 +08:00
### Tech Stack
| 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 |
2026-02-27 01:57:04 +08:00
```text
2026-02-27 20:07:06 +08:00
┌─────────────────────────────────────┐
│ Docker Compose │
│ │
│ ┌───────────────────────────────┐ │
│ │ frontend (Nginx) → :8888 │ │
│ └──────────────┬────────────────┘ │
│ │ /api/* proxy │
│ ┌──────────────▼────────────────┐ │
│ │ backend (Flask) → :5000 │ │
│ └──────────────┬────────────────┘ │
│ ┌──────────────▼────────────────┐ │
│ │ postgres (PG 16) → :5432 │ │
│ └───────────────────────────────┘ │
│ │
│ External: LLM APIs · Exchanges · │
│ TronGrid · Data providers │
└─────────────────────────────────────┘
2026-01-26 20:34:29 +08:00
```
2026-02-27 01:57:04 +08:00
### Repository Layout
```text
2026-02-27 19:57:23 +08:00
QuantDinger/
2026-02-27 20:07:06 +08:00
├── backend_api_python/ # 🐍 Backend (Open Source, Apache 2.0)
│ ├── app/routes/ # API endpoints
│ ├── app/services/ # Business logic (AI, trading, payment)
2026-02-27 19:57:23 +08:00
│ ├── migrations/init.sql # Database schema
2026-02-27 20:07:06 +08:00
│ ├── env.example # ⚙️ Config template → copy to .env
│ └── Dockerfile
2026-02-27 19:57:23 +08:00
├── frontend/ # 🎨 Frontend (Pre-built)
2026-02-27 20:07:06 +08:00
│ ├── dist/ # Static files (HTML/JS/CSS)
│ ├── Dockerfile # Nginx image
│ └── nginx.conf # SPA routing + API proxy
├── docs/ # 📚 Guides & tutorials
2026-02-27 19:57:23 +08:00
├── docker-compose.yml # 🐳 One-click deployment
2026-02-27 20:07:06 +08:00
└── LICENSE # Apache 2.0
2026-02-27 01:57:04 +08:00
```
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
<details>
<summary><b>⚙️ Configuration Reference (.env)</b></summary>
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
Use `backend_api_python/env.example` as template:
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
| Category | Key Variables |
2026-02-27 01:57:04 +08:00
|----------|-----------|
| **Auth** | `SECRET_KEY` , `ADMIN_USER` , `ADMIN_PASSWORD` |
| **Database** | `DATABASE_URL` (PostgreSQL connection string) |
2026-02-27 20:07:06 +08:00
| **AI / LLM** | `LLM_PROVIDER` , `OPENROUTER_API_KEY` , `OPENAI_API_KEY` |
| **OAuth** | `GOOGLE_CLIENT_ID` , `GITHUB_CLIENT_ID` |
2026-02-27 01:57:04 +08:00
| **Security** | `TURNSTILE_SITE_KEY` , `ENABLE_REGISTRATION` |
2026-02-27 20:07:06 +08:00
| **Membership** | `MEMBERSHIP_MONTHLY_PRICE_USD` , `MEMBERSHIP_MONTHLY_CREDITS` |
| **USDT Payment** | `USDT_PAY_ENABLED` , `USDT_TRC20_XPUB` , `TRONGRID_API_KEY` |
2026-02-27 01:57:04 +08:00
| **Proxy** | `PROXY_PORT` or `PROXY_URL` |
| **Workers** | `ENABLE_PENDING_ORDER_WORKER` , `ENABLE_PORTFOLIO_MONITOR` |
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
</details>
2026-01-26 20:32:34 +08:00
2026-02-27 20:07:06 +08:00
<details>
<summary><b>🔌 API Endpoints</b></summary>
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
| 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 |
2026-01-26 20:34:29 +08:00
For the full route list, see `backend_api_python/app/routes/` .
2026-02-27 20:07:06 +08:00
</details>
2026-01-26 20:34:29 +08:00
---
2026-02-27 20:07:06 +08:00
## 📚 Documentation Index
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
All detailed guides are in the [`docs/` ](docs/ ) folder:
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
### Getting Started
2026-02-27 19:57:23 +08:00
2026-02-27 20:07:06 +08:00
| Document | Description |
|----------|-------------|
| [Changelog ](docs/CHANGELOG.md ) | Version history & migration notes |
| [Multi-User Setup ](docs/multi-user-setup.md ) | PostgreSQL multi-user deployment |
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
### Strategy Development
| Guide | 🇺🇸 EN | 🇨🇳 CN | 🇹🇼 TW | 🇯🇵 JA | 🇰🇷 KO |
|-------|--------|--------|--------|--------|--------|
| **Strategy Dev** | [EN ](docs/STRATEGY_DEV_GUIDE.md ) | [CN ](docs/STRATEGY_DEV_GUIDE_CN.md ) | [TW ](docs/STRATEGY_DEV_GUIDE_TW.md ) | [JA ](docs/STRATEGY_DEV_GUIDE_JA.md ) | [KO ](docs/STRATEGY_DEV_GUIDE_KO.md ) |
| **Cross-Sectional** | [EN ](docs/CROSS_SECTIONAL_STRATEGY_GUIDE_EN.md ) | [CN ](docs/CROSS_SECTIONAL_STRATEGY_GUIDE_CN.md ) | | | |
| **Code Examples** | [examples/ ](docs/examples/ ) | | | | |
2025-12-29 03:06:49 +08:00
2026-02-27 20:07:06 +08:00
### Broker & Integration
| Guide | English | 中文 |
|-------|---------|------|
| **IBKR (US Stocks)** | [Guide ](docs/IBKR_TRADING_GUIDE_EN.md ) | — |
| **MT5 (Forex)** | [Guide ](docs/MT5_TRADING_GUIDE_EN.md ) | [指南 ](docs/MT5_TRADING_GUIDE_CN.md ) |
| **OAuth (Google/GitHub)** | [Guide ](docs/OAUTH_CONFIG_EN.md ) | [指南 ](docs/OAUTH_CONFIG_CN.md ) |
### Notifications
| Channel | English | 中文 |
|---------|---------|------|
| **Telegram** | [Setup ](docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md ) | [配置 ](docs/NOTIFICATION_TELEGRAM_CONFIG_CH.md ) |
| **Email (SMTP)** | [Setup ](docs/NOTIFICATION_EMAIL_CONFIG_EN.md ) | [配置 ](docs/NOTIFICATION_EMAIL_CONFIG_CH.md ) |
| **SMS (Twilio)** | [Setup ](docs/NOTIFICATION_SMS_CONFIG_EN.md ) | [配置 ](docs/NOTIFICATION_SMS_CONFIG_CH.md ) |
2026-01-26 20:34:29 +08:00
---
2026-02-27 20:07:06 +08:00
## 💼 License & Commercial
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
### Open Source License
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
Backend source code is licensed under **Apache License 2.0** . See `LICENSE` .
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
The frontend UI is provided as **pre-built files** . Trademark rights (name/logo/branding) are governed separately — see `TRADEMARKS.md` .
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
### 🎓 Free Source Code for Non-Profit & Education
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
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** :
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
- 🏫 Universities & academic research
- 🌍 Open-source communities & developer groups
- 🤝 Non-profit & public welfare organizations
- 📚 Educational programs & student hackathons
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
### 💼 Commercial License
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
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 ](https://t.me/worldinbroker ) |
| **Email** | [brokermr810@gmail.com ](mailto:brokermr810@gmail.com ) |
2026-01-14 21:41:40 +08:00
---
2026-02-27 20:07:06 +08:00
## 🤝 Community & Support
<p>
<a href="https://t.me/quantdinger"><img src="https://img.shields.io/badge/Telegram-Group-26A5E4?style=for-the-badge&logo=telegram" alt="Telegram"></a>
2026-03-17 20:30:04 +08:00
<a href="https://discord.com/invite/tyx5B6TChr"><img src="https://img.shields.io/badge/Discord-Server-5865F2?style=for-the-badge&logo=discord" alt="Discord"></a>
2026-02-27 20:07:06 +08:00
<a href="https://youtube.com/@quantdinger "><img src="https://img.shields.io/badge/YouTube-Channel-FF0000?style=for-the-badge&logo=youtube" alt="YouTube"></a>
</p>
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
- [Contributing Guide ](CONTRIBUTING.md ) · [Contributors ](CONTRIBUTORS.md )
- [Report Bugs / Request Features ](https://github.com/brokermr810/QuantDinger/issues )
- Email: [brokermr810@gmail.com ](mailto:brokermr810@gmail.com )
2026-01-26 20:34:29 +08:00
2026-02-27 20:07:06 +08:00
---
### 💝 Support the Project
2025-12-29 03:06:49 +08:00
2026-01-14 21:41:40 +08:00
**Crypto Donations (ERC-20 / BEP-20 / Polygon / Arbitrum)**
2025-12-29 19:05:17 +08:00
2026-01-14 21:41:40 +08:00
```
0x96fa4962181bea077f8c7240efe46afbe73641a7
```
2025-12-29 19:05:17 +08:00
2026-01-14 21:41:40 +08:00
<p>
<img src="https://img.shields.io/badge/USDT-Accepted-26A17B?style=for-the-badge&logo=tether&logoColor=white" alt="USDT">
<img src="https://img.shields.io/badge/ETH-Accepted-3C3C3D?style=for-the-badge&logo=ethereum&logoColor=white" alt="ETH">
</p>
2025-12-29 19:05:17 +08:00
---
2026-01-26 20:34:29 +08:00
### 🎓 Supporting Partners
2026-01-24 23:57:39 +08:00
<div align="center">
2026-01-26 20:34:29 +08:00
<table>
<tr>
<td align="center" width="50%">
<a href="https://beinvolved.indiana.edu/organization/quantfiniu" target="_blank">
2026-02-27 20:07:06 +08:00
<img src="docs/screenshots/qfs_logo.png" alt="Indiana University QFS" width="280" style="border-radius: 8px;">
2026-01-26 20:34:29 +08:00
</a>
<br/><br/>
<strong>Quantitative Finance Society (QFS)</strong><br/>
2026-02-27 20:07:06 +08:00
<small>Indiana University Bloomington</small>
2026-01-26 20:34:29 +08:00
</td>
</tr>
</table>
2026-01-24 23:57:39 +08:00
</div>
2026-02-27 20:07:06 +08:00
> 💡 **Want to become a partner?** Contact [brokermr810@gmail.com](mailto:brokermr810@gmail.com) or [Telegram](https://t.me/worldinbroker).
2026-01-24 23:57:39 +08:00
2026-01-26 20:34:29 +08:00
---
2026-01-26 20:32:34 +08:00
2026-01-26 20:34:29 +08:00
### Acknowledgements
2026-02-27 20:29:59 +08:00
Built with ❤️ on the shoulders of: [Flask ](https://flask.palletsprojects.com/ ) · [Pandas ](https://pandas.pydata.org/ ) · [CCXT ](https://github.com/ccxt/ccxt ) · [yfinance ](https://github.com/ranaroussi/yfinance ) · [Vue.js ](https://vuejs.org/ ) · [Ant Design Vue ](https://antdv.com/ ) · [KlineCharts ](https://github.com/klinecharts/KLineChart ) · [ECharts ](https://echarts.apache.org/ ) · [Capacitor ](https://capacitorjs.com/ ) · [bip-utils ](https://github.com/ebellocchia/bip_utils )
<p align="center"><sub>If QuantDinger helps you, consider ⭐ starring the repo — it means a lot!</sub></p>