QuantDinger: An open-source local quantitative trading platform.
Source: Dev.to
Project Positioning
QuantDinger aims to create a “Local‑First” open‑source AI quantitative‑trading workbench. It is designed as a self‑hosted alternative to TradingView and QuantConnect, with the core principle of returning data ownership to the user. By addressing the pain points of expensive SaaS platforms, QuantDinger provides a self‑hosted solution that integrates:
- Data acquisition
- AI‑driven investment research
- Strategy back‑testing
- Live trading
Core Functional Entities
Multi‑source Data Aggregation
Unified data interfaces for:
- Cryptocurrencies – via CCXT
- US stocks – via YFinance / Finnhub
- Chinese A‑shares – via AkShare
All sources deliver a standardized OHLCV (Open, High, Low, Close, Volume) format.

Strategy Development Environment
A built‑in code editor based on Monaco Editor that supports strategy development in Python.

Visualization Charts
Integration of TradingView’s Lightweight Charts library for candlestick chart display and technical‑indicator analysis.

LLM‑Assisted Tools
External large‑language‑model (LLM) services (via OpenRouter API) help generate code snippets or interpret market news.
Note: This is a functional module, not a core part of the system.

Live / Simulated Trading
Supports connection to exchange APIs for order routing and asset management.

Technology Selection and Architecture Diagram
Codebase Directory Structure
QuantDinger/
├── backend_api_python/ # Flask backend
│ ├── app/
│ │ ├── routes/ # API endpoints
│ │ ├── services/ # Business logic
│ │ ├── models/ # ORM models
│ │ └── utils/ # Helper utilities
│ ├── quantdinger.db # SQLite DB
│ ├── requirements.txt # Python dependencies
│ └── run.py # Application entry point
├── quantdinger_vue/ # Vue frontend
│ ├── src/
│ └── package.json
└── docker-compose.yml # Docker orchestration
Technology Stack Details
| Layer | Technologies |
|---|---|
| Frontend | Vue.js 3, Vite, TypeScript, Lightweight Charts, Element Plus |
| Backend | Python 3, Flask, SQLAlchemy (ORM), Pydantic (validation) |
| Data Adaptation | ccxt (crypto exchanges), akshare (A‑share data), yfinance (US stocks) |
| Persistence | SQLite (file‑based DB – no separate MySQL/PostgreSQL needed) |
Database Design
The project uses SQLite (quantdinger.db) to store metadata, avoiding heavy database maintenance.
Tables
| Table | Purpose | Key Fields |
|---|---|---|
| users | Basic authentication | id, username, password_hash, api_token |
| api_keys | Exchange credentials (AES‑encrypted) | id, exchange_name, api_key, secret_key, user_id |
| strategies | User‑written strategy code & config | id, name, code_content (Python source), timeframe, symbol, status |
| logs / trade_history | Signals & transaction history | id, strategy_id, timestamp, action (BUY/SELL), price, amount, message |
Detailed Implementation of Core Modules
4.1 Backend Interface Layer (app/routes)
(Further implementation details continue in the source repository.)
QuantDinger – Overview & Deployment Guide
1. Flask Blueprint (RESTful APIs)
| Route | Method | Description |
|---|---|---|
| /api/market | GET | Receives time range and symbol parameters from the frontend, calls the data‑service layer, and returns a JSON‑formatted candlestick chart array. |
| /api/strategy | — | |
POST /save | POST | Receives a Python code string and stores it in the database. |
| … | — | (additional endpoints omitted) |