Skip to content

brokermr810/QuantDinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

182 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
QuantDinger Logo

QuantDinger

AI-Native Quantitative Trading Platform

Vibe Coding Meets Algo Trading

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ ย ยทย  ๐Ÿ‡บ๐Ÿ‡ธ English

๐ŸŒ 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.

License Version Python Docker Vibe Coding Stars

Telegram Discord X

๐Ÿ‡บ๐Ÿ‡ธ English ยท ๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡ ยท ๐Ÿ‡น๐Ÿ‡ผ ็น้ซ”ไธญๆ–‡ ยท ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž ยท ๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด ยท ๐Ÿ‡ฉ๐Ÿ‡ช Deutsch ยท ๐Ÿ‡ซ๐Ÿ‡ท Franรงais ยท ๐Ÿ‡น๐Ÿ‡ญ เน„เธ—เธข ยท ๐Ÿ‡ป๐Ÿ‡ณ Tiแบฟng Viแป‡t ยท ๐Ÿ‡ธ๐Ÿ‡ฆ ุงู„ุนุฑุจูŠุฉ


๐Ÿ“‘ Table of Contents


๐Ÿš€ 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

๐ŸŽฏ Why QuantDinger?

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

Video Demo
Dashboard
๐Ÿ“Š Professional Quant Dashboard
AI Analysis
๐Ÿค– AI Deep Research
Trading Assistant
๐Ÿ’ฌ Smart Trading Assistant
Indicator Analysis
๐Ÿ“ˆ Indicator Analysis
Code Generation
๐Ÿ AI Strategy Coding
Portfolio Monitor
๐Ÿ“Š Portfolio Monitor

โœจ Key Features

๐ŸŽต Vibe Coding Strategy Workbench

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

๐Ÿค– 7-Agent AI Analysis Engine

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.

๐Ÿ“ˆ Full Trading Lifecycle

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

๐Ÿ“Š 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

๐Ÿ’ฐ Built-in Monetization

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

๐Ÿ” Enterprise-Grade Security

  • 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 Agent Architecture Diagram (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["๐Ÿค– 7-Agent Workflow"]
        subgraph P1["๐Ÿ“ˆ Phase 1 ยท Parallel Analysis"]
            E1["๐Ÿ” MarketAnalyst"]
            E2["๐Ÿ“‘ FundamentalAnalyst"]
            E3["๐Ÿ“ฐ NewsAnalyst"]
            E4["๐Ÿ’ญ SentimentAnalyst"]
            E5["โš ๏ธ RiskAnalyst"]
        end
        subgraph P2["๐ŸŽฏ Phase 2 ยท Bull vs Bear Debate"]
            F1["๐Ÿ‚ BullResearcher"]
            F2["๐Ÿป BearResearcher"]
        end
        subgraph P3["๐Ÿ’น Phase 3 ยท Final Decision"]
            G["๐ŸŽฐ TraderAgent โ†’ BUY / SELL / HOLD"]
        end
    end
    subgraph Memory["๐Ÿง  Local Memory Store"]
        M1[("Agent Memories (PostgreSQL)")]
    end
    subgraph Reflect["๐Ÿ”„ Reflection Loop"]
        R[ReflectionService]
        W["โฐ ReflectionWorker โ†’ verify + learn"]
    end
    A --> B --> C --> D
    D --> P1 --> P2 --> P3
    Agents <-.->|"RAG retrieval"| M1
    C --> R
    W -.->|"update memories"| M1
Loading

๐Ÿ”Œ 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

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
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         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
Email brokermr810@gmail.com

๐Ÿค Community & Support

Telegram Discord YouTube


๐Ÿ’ Support the Project

Crypto Donations (ERC-20 / BEP-20 / Polygon / Arbitrum)

0x96fa4962181bea077f8c7240efe46afbe73641a7

USDT ETH


๐ŸŽ“ Supporting Partners

Indiana University QFS

Quantitative Finance Society (QFS)
Indiana University Bloomington

๐Ÿ’ก Want to become a partner? Contact brokermr810@gmail.com or Telegram.


Acknowledgements

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!

Packages

 
 
 

Contributors

Languages