# QuantDinger **Repository Path**: wy_love/quant-dinger ## Basic Information - **Project Name**: QuantDinger - **Description**: QuantDinger - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-19 - **Last Updated**: 2026-01-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
QuantDinger Logo

QuantDinger

๐Ÿ‡บ๐Ÿ‡ธ English | ๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡ | ๐Ÿ‡น๐Ÿ‡ผ ็น้ซ”ไธญๆ–‡ | ๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž | ๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด

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.

Official Community ยท Live Demo ยท ๐Ÿ“บ Video Demo ยท ๐ŸŒŸ Join Us

License Python Vue Docker Stars

Telegram Group Discord X

--- ## ๐Ÿ“– Introduction ### What is QuantDinger? QuantDinger is a **local-first, privacy-first quantitative trading infrastructure**. It runs entirely on your machine, giving you full control over your strategies, trading data, and API keys. ### Why Local-First? Unlike SaaS platforms that lock your data and strategies in the cloud, QuantDinger runs locally. Your strategies, trading logs, API keys, and analysis results stay on your machine. No vendor lock-in, no subscription fees, no data exfiltration. ### Who is this for? QuantDinger is built for traders, researchers, and engineers who: - Value data sovereignty and privacy - Want transparent, auditable trading infrastructure - Prefer engineering over marketing - Need a complete workflow: data, analysis, backtesting, and execution ### Core Features QuantDinger includes a built-in **LLM-based multi-agent research system** that gathers financial intelligence from the web, combines it with local market data, and generates analysis reports. This integrates with strategy development, backtesting, and live trading workflows. ### Core Value - **๐Ÿ”“ Apache 2.0 Open Source**: Fully permissive and commercial-friendly. Unlike viral licenses (GPL/AGPL), you truly own your code and modifications. - **๐Ÿ Python-Native & Visual**: Write indicators in standard Python (easier than PineScript) with AI assistance. Visualize signals directly on chartsโ€”a "Local TradingView" experience. - **๐Ÿค– AI-Loop Optimization**: It doesn't just run strategies; AI analyzes backtest results to suggest parameter tuning (Stop-Loss/TP/MACD settings), forming a closed optimization loop. - **๐ŸŒ Universal Market Access**: One unified system for Crypto (Live), US/CN Stocks, Forex, and Futures (Data/Notify). - **โšก Docker & Clean Arch**: 4-line command deployment. Modern Tech Stack (Vue + Python) with a clean, separation-of-concerns architecture. --- ## ๐Ÿ“บ Video Demo
QuantDinger Project Introduction Video

Click the video above to watch the QuantDinger project introduction

--- ## ๐Ÿ“š Documentation - [Python Strategy Development Guide](docs/STRATEGY_DEV_GUIDE.md) ## ๐Ÿ“ธ Visual Tour

๐Ÿ“Š Professional Quant Dashboard

Real-time monitoring of market dynamics, assets, and strategy status.

QuantDinger Dashboard

๐Ÿค– AI Deep Research

Multi-agent collaboration for market sentiment & technical analysis.

AI Market Analysis

๐Ÿ’ฌ Smart Trading Assistant

Natural language interface for instant market insights.

Trading Assistant

๐Ÿ“ˆ Interactive Indicator Analysis

Rich library of technical indicators with drag-and-drop analysis.

Indicator Analysis

๐Ÿ Python Strategy Gen

Built-in editor with AI-assisted strategy coding.

Code Generation
--- ## โœจ Key Features ### 1. Visual Python Strategy Workbench *Better than PineScript, Smarter than SaaS.* - **Python Native**: Write indicators and strategies in Python. Leverage the entire Python ecosystem (Pandas, Numpy, TA-Lib) instead of proprietary languages like PineScript. - **"Mini-TradingView" Experience**: Run your Python indicators directly on the built-in K-line charts. Visually debug buy/sell signals on historical data. - **AI-Assisted Coding**: Let the built-in AI write the complex logic for you. From idea to code in seconds. ### 2. Complete Trading Lifecycle *From Indicator to Execution, Seamlessly.* 1. **Indicator**: Define your market entry/exit signals. 2. **Strategy Config**: Attach risk management rules (Position sizing, Stop-Loss, Take-Profit). 3. **Backtest & AI Optimization**: Run backtests, view rich performance metrics, and **let AI analyze the result to suggest improvements** (e.g., "Adjust MACD threshold to X"). 4. **Execution Mode**: - **Live Trading**: Direct API execution for 10+ Crypto Exchanges (Binance, OKX, etc.). - **Signal Notification**: For non-executable markets (Stocks/Forex/Futures), send signals via Telegram, Discord, Email, SMS, or Webhook. ### 3. AI Multi-Agent Research *Your 24/7 AI Investment Committee.* The system employs a multi-agent team to act as a secondary filter for your strategies: - **Research Agents**: Scrape web news and macro events (Google/Bing). - **Analysis Agents**: Analyze technical indicators and capital flows. - **Strategic Integration**: The AI judgment can serve as a "Market Filter"โ€”only allowing your strategy to trade when the AI sentiment aligns (e.g., "Don't buy if AI Risk Analyst flags high macro danger"). ### 4. Universal Data Engine QuantDinger provides a unified data interface across multiple markets: - **Cryptocurrency**: Direct API connections for trading (10+ exchanges) and CCXT integration for market data (100+ sources) - **Stocks**: Yahoo Finance, Finnhub, Tiingo (US stocks), and AkShare (CN/HK stocks) - **Futures/Forex**: OANDA and major futures data sources - **Proxy Support**: Built-in proxy configuration for restricted network environments ### 5. Memory-Augmented Agents (Local RAG + Reflection Loop) QuantDingerโ€™s agents donโ€™t start from scratch every time. The backend includes a **local memory store** and an optional **reflection/verification loop**: - **What it is**: RAG-style experience retrieval injected into agent prompts (NOT model fine-tuning). - **Where it lives**: Local SQLite files under `backend_api_python/data/memory/` (privacy-first). ```mermaid flowchart TB %% ===== ๐ŸŒ Entry Layer ===== subgraph Entry["๐ŸŒ API Entry"] A["๐Ÿ“ก POST /api/analysis/multi"] A2["๐Ÿ”„ POST /api/analysis/reflect"] end %% ===== โš™๏ธ Service Layer ===== subgraph Service["โš™๏ธ Service Orchestration"] B[AnalysisService] C[AgentCoordinator] D["๐Ÿ“Š Build Context
price ยท kline ยท news ยท indicators"] end %% ===== ๐Ÿค– Multi-Agent Workflow ===== subgraph Agents["๐Ÿค– Multi-Agent Workflow"] subgraph P1["๐Ÿ“ˆ Phase 1 ยท Analysis (Parallel)"] E1["๐Ÿ” MarketAnalyst
Technical"] E2["๐Ÿ“‘ FundamentalAnalyst
Fundamentals"] E3["๐Ÿ“ฐ NewsAnalyst
News & Events"] E4["๐Ÿ’ญ SentimentAnalyst
Market Mood"] E5["โš ๏ธ RiskAnalyst
Risk Assessment"] end subgraph P2["๐ŸŽฏ Phase 2 ยท Debate (Parallel)"] F1["๐Ÿ‚ BullResearcher
Bullish Case"] F2["๐Ÿป BearResearcher
Bearish Case"] end subgraph P3["๐Ÿ’น Phase 3 ยท Decision"] G["๐ŸŽฐ TraderAgent
Final Verdict โ†’ BUY / SELL / HOLD"] end end %% ===== ๐Ÿง  Memory Layer ===== subgraph Memory["๐Ÿง  Local SQLite Memory (data/memory/)"] M1[("market_analyst")] M2[("fundamental")] M3[("news_analyst")] M4[("sentiment")] M5[("risk_analyst")] M6[("bull_researcher")] M7[("bear_researcher")] M8[("trader_agent")] end %% ===== ๐Ÿ”„ Reflection Loop ===== subgraph Reflect["๐Ÿ”„ Reflection Loop (Optional)"] R[ReflectionService] RR[("reflection_records.db")] W["โฐ ReflectionWorker"] end %% ===== Main Flow ===== A --> B --> C --> D D --> P1 --> P2 --> P3 %% ===== Memory Read/Write ===== E1 <-.-> M1 E2 <-.-> M2 E3 <-.-> M3 E4 <-.-> M4 E5 <-.-> M5 F1 <-.-> M6 F2 <-.-> M7 G <-.-> M8 %% ===== Reflection Flow ===== C --> R --> RR W --> RR W -.->|"verify + learn"| M8 A2 -.->|"manual review"| M8 ``` **Retrieval ranking (simplified)**: \[ score = w_{sim}\cdot sim + w_{recency}\cdot recency + w_{returns}\cdot returns\_score \] Config lives in `.env` (see `backend_api_python/env.example`): `ENABLE_AGENT_MEMORY`, `AGENT_MEMORY_TOP_K`, `AGENT_MEMORY_ENABLE_VECTOR`, `AGENT_MEMORY_HALF_LIFE_DAYS`, and `ENABLE_REFLECTION_WORKER`. ### 6. Strategy Runtime - **Thread-Based Executor**: Independent thread pool for strategy execution - **Auto-Restore**: Resumes running strategies after system restarts - **Order Queue**: Background worker for order execution ### 7. Tech Stack - **Backend**: Python (Flask) + SQLite + Redis (optional) - **Frontend**: Vue 2 + Ant Design Vue + KlineCharts/ECharts - **Deployment**: Docker Compose --- ## ๐Ÿ”Œ Supported Exchanges QuantDinger supports direct API connections to major cryptocurrency exchanges for execution, and uses CCXT for broad market data coverage. ### Direct API Support | Exchange | Markets | |:--------:|:---------| | Binance | Spot, Futures, Margin | | OKX | Spot, Perpetual, Options | | Bitget | Spot, Futures, Copy Trading | ### Also Supported via CCXT Bybit, Gate.io, Kraken, KuCoin, HTX, and 100+ other exchanges for market data. --- ### Multi-Language Support QuantDinger is built for a global audience with comprehensive internationalization:

English Simplified Chinese Traditional Chinese Japanese Korean German French Thai Vietnamese Arabic

All UI elements, error messages, and documentation are fully translated. Language is auto-detected based on browser settings or can be manually switched in the app. --- ### Supported Markets | Market Type | Data Sources | Trading | |-------------|--------------|---------| | **Cryptocurrency** | Binance, OKX, Bitget, + 100 exchanges | โœ… Full support | | **US Stocks** | Yahoo Finance, Finnhub, Tiingo | โœ… Via broker API | | **CN/HK Stocks** | AkShare, East Money | โšก Data only | | **Forex** | Finnhub, OANDA | โœ… Via broker API | | **Futures** | Exchange APIs, AkShare | โšก Data only | --- ### Architecture (Current Repo) ```text โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ quantdinger_vue โ”‚ โ”‚ (Vue 2 + Ant Design Vue) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ HTTP (/api/*) โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ backend_api_python โ”‚ โ”‚ (Flask + strategy runtime) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”œโ”€ SQLite (quantdinger.db) โ”œโ”€ Redis (optional cache) โ””โ”€ Data providers / LLMs / Exchanges ``` --- ### Repository Layout ```text . โ”œโ”€ backend_api_python/ # Flask API + AI + backtest + strategy runtime โ”‚ โ”œโ”€ app/ โ”‚ โ”œโ”€ env.example # Copy to .env for local config โ”‚ โ”œโ”€ requirements.txt โ”‚ โ””โ”€ run.py # Entrypoint โ””โ”€ quantdinger_vue/ # Vue 2 UI (dev server proxies /api -> backend) ``` --- ## Quick Start ### Option 1: Docker Deployment (Recommended) The fastest way to get QuantDinger running. #### 1. Start Services **Linux / macOS** ```bash git clone https://github.com/brokermr810/QuantDinger.git && \ cd QuantDinger && \ cp backend_api_python/env.example backend_api_python/.env && \ docker-compose up -d --build ``` **Windows (PowerShell)** ```powershell git clone https://github.com/brokermr810/QuantDinger.git cd QuantDinger Copy-Item backend_api_python\env.example -Destination backend_api_python\.env docker-compose up -d --build ``` #### 2. Configuration & Access - **Frontend UI**: http://localhost:8888 - **Default Account**: `quantdinger` / `123456` > **Note**: For production or AI features, edit `backend_api_python/.env` (add `OPENROUTER_API_KEY`, change passwords) and restart with `docker-compose restart backend`. #### 3. Access the Application - **Frontend UI**: http://localhost - **Backend API**: http://localhost:5000 #### Docker Commands Reference ```bash # View running status docker-compose ps # View logs docker-compose logs -f # View backend logs only docker-compose logs -f backend # View frontend logs only docker-compose logs -f frontend # Stop services docker-compose down # Stop and remove volumes (WARNING: deletes database!) docker-compose down -v # Restart services docker-compose restart # Rebuild and restart docker-compose up -d --build # Enter backend container docker exec -it quantdinger-backend /bin/bash # Enter frontend container docker exec -it quantdinger-frontend /bin/sh ``` #### Docker Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Frontend โ”‚ โ”‚ Backend โ”‚ โ”‚ (Nginx) โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ (Python) โ”‚ โ”‚ Port: 80 โ”‚ โ”‚ Port: 5000 โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Docker Network ``` - **Frontend**: Vue.js app served by Nginx, proxies API requests to backend - **Backend**: Python Flask API service #### Data Persistence The following data is mounted to the host and persists across container restarts: ```yaml volumes: - ./backend_api_python/quantdinger.db:/app/quantdinger.db # Database - ./backend_api_python/logs:/app/logs # Logs - ./backend_api_python/data:/app/data # Data directory - ./backend_api_python/.env:/app/.env # Configuration ``` #### Customization **Change ports** - Edit `docker-compose.yml`: ```yaml services: frontend: ports: - "8080:80" # Change to port 8080 backend: ports: - "5001:5000" # Change to port 5001 ``` **Configure HTTPS** - Use a reverse proxy (like Caddy/Nginx): ```bash # Using Caddy (automatic HTTPS) caddy reverse-proxy --from yourdomain.com --to localhost:80 ``` #### Production Recommendations **Security:** ```bash # Generate strong SECRET_KEY openssl rand -hex 32 # Set secure admin password ADMIN_PASSWORD=your-very-secure-password ``` **Resource limits** - Add to `docker-compose.yml`: ```yaml services: backend: deploy: resources: limits: cpus: '2' memory: 2G reservations: cpus: '0.5' memory: 512M ``` **Log management:** ```yaml services: backend: logging: driver: "json-file" options: max-size: "100m" max-file: "3" ``` #### Docker Troubleshooting **Frontend can't connect to backend:** ```bash docker-compose logs backend curl http://localhost:5000/api/health ``` **Database permission issues:** ```bash chmod 666 backend_api_python/quantdinger.db ``` **Build failures:** ```bash # Clear Docker cache and rebuild docker-compose build --no-cache ``` **Out of memory:** ```bash # Check memory usage docker stats # Add swap space (Linux) sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile ``` #### Updating ```bash # Pull latest code git pull # Rebuild and restart docker-compose up -d --build ``` #### Backup ```bash # Backup database cp backend_api_python/quantdinger.db backup/quantdinger_$(date +%Y%m%d).db # Backup configuration cp backend_api_python/.env backup/.env_$(date +%Y%m%d) ``` --- ### Option 2: Local Development **Prerequisites** - Python 3.10+ recommended - Node.js 16+ recommended #### 1. Start the backend (Flask API) ```bash cd backend_api_python pip install -r requirements.txt cp env.example .env # Windows: copy env.example .env python run.py ``` Backend will be available at `http://localhost:5000`. #### 2. Start the frontend (Vue UI) ```bash cd quantdinger_vue npm install npm run serve ``` Frontend dev server runs at `http://localhost:8000` and proxies `/api/*` to `http://localhost:5000` (see `quantdinger_vue/vue.config.js`). --- ### Configuration (.env) Use `backend_api_python/env.example` as a template. Common settings include: - **Auth**: `SECRET_KEY`, `ADMIN_USER`, `ADMIN_PASSWORD` - **Server**: `PYTHON_API_HOST`, `PYTHON_API_PORT`, `PYTHON_API_DEBUG` - **Database**: `SQLITE_DATABASE_FILE` (optional; default is `backend_api_python/data/quantdinger.db`) - **AI / LLM**: `OPENROUTER_API_KEY`, `OPENROUTER_MODEL`, timeouts - **Web search**: `SEARCH_PROVIDER`, `SEARCH_GOOGLE_*`, `SEARCH_BING_API_KEY` - **Proxy (optional)**: `PROXY_PORT` or `PROXY_URL` - **Workers**: `ENABLE_PENDING_ORDER_WORKER`, `DISABLE_RESTORE_RUNNING_STRATEGIES` --- ### API The backend provides REST endpoints for login, market data, indicators, backtesting, strategies, and AI analysis. - Health: `GET /health` (also supports `GET /api/health` for deployment probes) - Auth (frontend-compatible): `POST /api/user/login`, `POST /api/user/logout`, `GET /api/user/info` For the full route list, see `backend_api_python/app/routes/`. --- ### License Licensed under the **Apache License 2.0**. See `LICENSE`. --- ## ๐Ÿค Community & Support - **Contributing**: [Contributing Guide](CONTRIBUTING.md) ยท [Contributors](CONTRIBUTORS.md) - **Telegram**: [QuantDinger Group](https://t.me/quantdinger) - **Discord**: [Join Server](https://discord.gg/vwJ8zxFh9Q) - **๐Ÿ“บ Video Demo**: [Project Introduction](https://youtu.be/HPTVpqL7knM) - **YouTube**: [@quantdinger](https://youtube.com/@quantdinger) - **Email**: [brokermr810@gmail.com](mailto:brokermr810@gmail.com) - **GitHub Issues**: [Report bugs / Request features](https://github.com/brokermr810/QuantDinger/issues) --- ## ๐Ÿ’ฐ Project Sustainability QuantDinger is open-source and free to use. If you find it useful, here are ways to support ongoing development: ### Direct Donations **ERC-20 / BEP-20 / Polygon / Arbitrum** ``` 0x96fa4962181bea077f8c7240efe46afbe73641a7 ``` USDT ETH ### Exchange Referral Links If you're signing up for supported exchanges, using the links below provides referral benefits that help support the project. These are optional and do not affect your trading fees or account functionality. | Exchange | Referral Link | |:--------:|:-------------| | Binance | [Sign up with referral](https://www.bmwweb.ac/referral/earn-together/refer2earn-usdc/claim?hl=zh-CN&ref=GRO_28502_9OSOJ) | | OKX | [Sign up with referral](https://www.bjwebptyiou.com/join/14449926) | | Bitget | [Sign up with referral](https://share.glassgs.com/u/H8XZGS71) | --- ### Professional Services Professional services are available: | Service | Description | |---------|-------------| | **Deployment & Setup** | One-on-one assistance with server deployment, configuration, and optimization | | **Custom Strategy Development** | Tailored trading strategies designed for your specific needs and markets | | **Enterprise Upgrade** | Commercial license, priority support, and advanced features for businesses | | **Training & Consulting** | Hands-on training sessions and strategic consulting for your trading team | **Interested?** Contact us via: - ๐Ÿ“ง Email: [brokermr810@gmail.com](mailto:brokermr810@gmail.com) - ๐Ÿ’ฌ Telegram: [QuantDinger Group](https://t.me/quantdinger) --- ### Acknowledgements QuantDinger stands on the shoulders of great open-source projects: | Project | Description | Link | |---------|-------------|------| | **Flask** | Lightweight WSGI web framework | [flask.palletsprojects.com](https://flask.palletsprojects.com/) | | **flask-cors** | Cross-Origin Resource Sharing extension | [GitHub](https://github.com/corydolphin/flask-cors) | | **Pandas** | Data analysis and manipulation library | [pandas.pydata.org](https://pandas.pydata.org/) | | **CCXT** | Cryptocurrency exchange trading library | [github.com/ccxt/ccxt](https://github.com/ccxt/ccxt) | | **yfinance** | Yahoo Finance market data downloader | [github.com/ranaroussi/yfinance](https://github.com/ranaroussi/yfinance) | | **akshare** | China financial data interface | [github.com/akfamily/akshare](https://github.com/akfamily/akshare) | | **requests** | HTTP library for Python | [requests.readthedocs.io](https://requests.readthedocs.io/) | | **Vue.js** | Progressive JavaScript framework | [vuejs.org](https://vuejs.org/) | | **Ant Design Vue** | Enterprise-class UI components | [antdv.com](https://antdv.com/) | | **KlineCharts** | Lightweight financial charting library | [github.com/klinecharts/KLineChart](https://github.com/klinecharts/KLineChart) | | **Lightweight Charts** | TradingView charting library | [github.com/nicepkg/lightweight-charts](https://github.com/nicepkg/lightweight-charts) | | **ECharts** | Apache data visualization library | [echarts.apache.org](https://echarts.apache.org/) | Thanks to all maintainers and contributors across these ecosystems! โค๏ธ