You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
|------|---------|-------|
7
7
| Docker & Docker Compose | 20+ | required for the default setup |
8
8
| Python | 3.10+ | only if running backend outside Docker |
9
-
| Node.js |18+ | only if you maintain the private QuantDinger-Vue repo|
9
+
| Node.js |22 LTS | only if you maintain the private QuantDinger-Vue or mobile source repos|
10
10
11
11
## Quick Start (Docker)
12
12
@@ -33,7 +33,7 @@ The stack includes:
33
33
|---------|------|-------------|
34
34
|`frontend`| 8888 | Nginx serving Vue SPA |
35
35
|`backend`| 5000 | Flask API (gunicorn) |
36
-
|`postgres`| 5432 | PostgreSQL 16|
36
+
|`postgres`| 5432 | PostgreSQL 18|
37
37
|`redis`| 6379 | Cache layer (LRU, 128 MB) |
38
38
39
39
## Project Structure
@@ -55,7 +55,7 @@ quantdinger/
55
55
│ └── requirements.txt
56
56
├── docs/ # Changelog, architecture notes
57
57
├── docker-compose.yml # frontend service pulls ghcr.io/.../quantdinger-frontend
58
-
├── docker-compose.ghcr.yml # both services pulled from GHCR (zero-clone deploy)
58
+
├── docker-compose.ghcr.yml # backend, frontend, and mobile pulled from GHCR (zero-clone deploy)
59
59
└── README.md
60
60
```
61
61
@@ -179,6 +179,8 @@ pytest tests/ -v
179
179
180
180
## Troubleshooting
181
181
182
+
-**First-time Docker install or pull failures** - see the bilingual [Installation Troubleshooting](docs/INSTALL_TROUBLESHOOTING.md) guide for Docker Desktop proxy setup, Docker Hub pull errors, and Postgres data-version issues.
183
+
182
184
-**"apikey parameter is incorrect"** from Twelve Data — verify `TWELVE_DATA_API_KEY` in `.env`; Chinese stock data requires a paid plan.
183
185
-**Heatmap "暂无数据"** — usually caused by NaN in yfinance data; the global JSON encoder now sanitises all NaN/Inf to `null`.
184
186
-**Redis connection refused** — ensure `redis` service is running (`docker compose up -d redis`); set `CACHE_ENABLED=false` to fall back to in-memory cache.
Copy file name to clipboardExpand all lines: README.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@
4
4
</a>
5
5
6
6
<h1>QuantDinger</h1>
7
-
<h3>The open-source AI infrastructure layer for quant trading</h3>
8
-
<p><strong>Turn trading ideas into Python strategies, backtests, paper trading, and live execution - all in one self-hosted stack.</strong></p>
7
+
<h3>Open-source AI Trading OS</h3>
8
+
<p><strong>Turn trading ideas into Python strategies, backtests, paper trading, live execution, and monitoring - all in one self-hosted stack.</strong></p>
9
9
<p><strong>QuantDinger is a product of Open Byte Inc.</strong></p>
For step-by-step detail and troubleshooting, see **[Installation & first-time setup](#installation--first-time-setup-docker-compose)**.
116
+
For step-by-step detail and troubleshooting, see **[Installation & first-time setup](#installation--first-time-setup-docker-compose)** and **[Installation troubleshooting](docs/INSTALL_TROUBLESHOOTING.md)**.
117
117
118
118
---
119
119
120
120
## Why QuantDinger
121
121
122
122
| Traditional workflow | QuantDinger |
123
123
|----------------------|-------------|
124
-
| ChatGPT only generates code | Runs, backtests, and executes strategies in one stack |
124
+
| ChatGPT only generates code | Runs, backtests, executes, and monitors strategies in one stack |
125
125
| TradingView + Jupyter + exchange bots are fragmented | One self-hosted stack from research to execution |
126
126
| SaaS platforms hold API keys | User-owned deployment — your infra, your keys |
127
127
| AI agents without scopes or audit | Scoped Agent Gateway, paper-only default, audit logs |
128
128
129
-
QuantDinger is a **self-hosted, local-first** quantitative infrastructure layer — not a chatbot with a buy button. It unifies **multi-LLM research**, **Python-native strategy engines**, **server-side backtesting**, and **multi-broker live execution** across crypto venues, IBKR, and Alpaca in one production-grade stack you fully control.
129
+
QuantDinger is a **self-hosted, local-first AI trading OS** — not a chatbot with a buy button. It unifies **multi-LLM research**, **Python-native strategy engines**, **server-side backtesting**, **automated execution**, and **multi-broker live operations** across crypto venues, IBKR, and Alpaca in one production-grade stack you fully control.
130
130
131
131
## Safety model
132
132
@@ -161,13 +161,13 @@ QuantDinger is a **self-hosted, local-first** quantitative infrastructure layer
161
161
162
162
|| What makes QuantDinger different |
163
163
|---|----------------------------------|
164
-
|**Full-stack quant OS**| Charting, indicator IDE, AI research, backtests, live bots, quick trade, and broker account management — one product, one Postgres state store. |
164
+
|**Full-stack AI trading OS**| Charting, indicator IDE, AI research, backtests, live bots, quick trade, and broker account management — one product, one Postgres state store. |
165
165
|**Agent-native**| First-class **Agent Gateway** (`/api/agent/v1`) + **[`quantdinger-mcp`](https://pypi.org/project/quantdinger-mcp/)** on PyPI — Cursor, Claude Code, and Codex can read markets, run backtests, and trade (paper by default) with full audit logs. |
166
166
|**Dual strategy runtimes**|**`IndicatorStrategy`** (four-way dataframe signals + chart overlays) and **`ScriptStrategy`** (event-driven `on_bar`, explicit orders) — research and production in the same codebase. |
167
167
|**Multi-venue execution**| Direct adapters for Binance, OKX, Bitget, Bybit, Gate, HTX, Coinbase Exchange, Kraken, **IBKR**, and **Alpaca** — unified Broker Accounts page with isolated multi-tenant sessions. |
|**Security by default**| Refuses default `SECRET_KEY`, agent tokens hashed at rest, **paper-only trading** unless explicitly unlocked server-side, every agent call audit-logged. |
170
-
|**Operator-ready**| OAuth, multi-user roles, credits/membership/USDT billing toggles, an 11-language web UI, and multilingual docs — build a commercial quant product on top, not just a hobby bot. |
170
+
|**Operator-ready**| OAuth, multi-user roles, credits/membership/USDT billing toggles, an 11-language web UI, and multilingual docs — build a commercial AI trading product on top, not just a hobby bot. |
**Do not use`docker compose up --build` for a normal install** — the main compose file only declares `image:` for the frontend; `--build` affects the backend only. Rebuild backend after code changes: `docker compose up -d --build backend`. For Vue source builds, use `docker-compose.build.yml` (see [Installation](#installation--first-time-setup-docker-compose)).
187
+
**A normal install does not need`docker compose up --build`** — the main compose file builds only the backend from local source; the web and mobile UI services pull GHCR images. Rebuild backend after code changes with `docker compose up -d --build backend`. For UI source builds, use `docker-compose.build.yml` (see [Installation](#installation--first-time-setup-docker-compose)).
**Audience:** independent quants, Python strategy authors, prop/small teams, and operators building white-label quant products on private infrastructure — without handing API keys to a black-box SaaS.
230
+
**Audience:** independent traders, Python strategy authors, small trading teams, and operators building white-label AI trading products on private infrastructure — without handing API keys to a black-box SaaS.
231
231
232
232
## Features at a glance
233
233
@@ -307,7 +307,7 @@ flowchart LR
307
307
308
308
> **Already ran [Try in 2 minutes](#try-in-2-minutes)?** Skip this section — it's the same outcome, just expanded into a step-by-step checklist for first-time deployers and operations folks who want to understand every knob.
309
309
310
-
This section mirrors a typical “local deploy” path: **prepare the host → obtain the code → configure secrets → start the stack → verify → harden → optionally wire AI**. Node.js is **not** required: the `frontend`service pulls `ghcr.io/brokermr810/quantdinger-frontend`directly, so Nginx serves the SPA without any local build step.
310
+
This section mirrors a typical “local deploy” path: **prepare the host → obtain the code → configure secrets → start the stack → verify → harden → optionally wire AI**. Node.js is **not** required: the `frontend`and `mobile` services pull GHCR images directly, so Nginx serves the web and H5 apps without any local build step.
311
311
312
312
### Prerequisites
313
313
@@ -372,8 +372,9 @@ docker compose up -d
372
372
```
373
373
374
374
-**`frontend`** — pulls `ghcr.io/brokermr810/quantdinger-frontend:latest` (no local Vue tree required).
375
+
-**`mobile`** — pulls `ghcr.io/brokermr810/quantdinger-mobile:latest` (no local mobile source tree required).
375
376
-**`backend`** — built from `./backend_api_python` on first start if no local image exists yet.
376
-
- For UI development from Vue source, clone **QuantDinger-Vue**into `./QuantDinger-Vue/`and add `-f docker-compose.build.yml` to the command (see *Build the frontend from Vue source* below).
377
+
- For UI development from source, clone **QuantDinger-Vue**and/or **QuantDinger-Mobile** into the expected local directories and add `-f docker-compose.build.yml` to the command (see *Build the frontend or mobile H5 from source* below).
377
378
378
379
Services: **`postgres`**, **`redis`**, **`backend`**, **`frontend`**, **`mobile`** (see `docker-compose.yml`).
379
380
@@ -419,7 +420,7 @@ Do **not** mount a PostgreSQL 16 data directory into a PostgreSQL 18 image, or t
419
420
420
421
#### Alternative: zero-repo install from GHCR (lightest)
421
422
422
-
Prebuilt multi-arch (amd64/arm64) images for **both**backend and frontend — no `git clone`:
423
+
Prebuilt multi-arch (amd64/arm64) images for **backend, web frontend, and mobile H5** — no `git clone`:
The same override can build the mobile H5 client from `./QuantDinger-Mobile/` or `MOBILE_SRC_PATH=/abs/path/to/QuantDinger-Mobile`.
468
469
469
-
The main `docker-compose.yml`only pulls GHCR images; the override file `docker-compose.build.yml` adds local `build:` blocks. Without the override, `./QuantDinger-Vue/` and `./QuantDinger-Mobile/` do not need to exist. Point `FRONTEND_SRC_PATH` / `MOBILE_SRC_PATH` somewhere else if you keep sources outside this repo, or set `COMPOSE_FILE=docker-compose.yml:docker-compose.build.yml` in a root `.env` to skip the long `-f -f` invocation.
470
+
The main `docker-compose.yml`builds the backend from this repository and pulls web/mobile UI images from GHCR; the override file `docker-compose.build.yml` adds local UI`build:` blocks. Without the override, `./QuantDinger-Vue/` and `./QuantDinger-Mobile/` do not need to exist. Point `FRONTEND_SRC_PATH` / `MOBILE_SRC_PATH` somewhere else if you keep sources outside this repo, or set `COMPOSE_FILE=docker-compose.yml:docker-compose.build.yml` in a root `.env` to skip the long `-f -f` invocation.
470
471
471
472
### 5) Verify and sign in
472
473
473
474
| Check | URL / command |
474
475
|--------|----------------|
475
-
| Web UI |`http://localhost:8888` (override host/port with `FRONTEND_HOST` / `FRONTEND_PORT` in root `.env` if needed). |
476
+
| Web UI |`http://localhost:8888` (override host/port with `FRONTEND_PORT` in root `.env` if needed, for example `127.0.0.1:8888`). |
476
477
| Mobile H5 |`http://localhost:8889` (override with `MOBILE_PORT`; on a phone, use your host LAN IP, for example `http://192.168.1.10:8889`). |
477
478
| API health |`http://localhost:5000/api/health`|
478
-
| Logs |`docker-compose logs -f backend`|
479
+
| Logs |`dockercompose logs -f backend`|
479
480
480
481
Admin account:
481
482
@@ -488,7 +489,7 @@ admin is treated as safely initialized and the first-login password reminder is
488
489
not shown. If an existing database still stores the old default, startup syncs
489
490
the first admin password to the non-default env value.
490
491
491
-
Also set **`FRONTEND_URL`** in `backend_api_python/.env` to the URL users actually use (including `https://` behind a reverse proxy); it affects redirects, CORS-related settings, and some generated links.
492
+
Also set **`FRONTEND_URL`** in `backend_api_python/.env`or `backend.env`to the URL users actually use (including `https://` behind a reverse proxy); it affects redirects, CORS-related settings, and some generated links.
492
493
493
494
### 5.1) Point the web/mobile clients at your own backend
494
495
@@ -606,7 +607,7 @@ When running the desktop or mobile UI containers by themselves, use `BACKEND_URL
606
607
docker run --rm -p 8889:80 -e BACKEND_URL=http://host.docker.internal:5000 ghcr.io/brokermr810/quantdinger-mobile:4.0.3
607
608
```
608
609
609
-
Production-style TLS, domain, and reverse-proxy placement are covered in **[Cloud deployment](docs/CLOUD_DEPLOYMENT_EN.md)**.
610
+
Production-style TLS, domain, and reverse-proxy placement are covered in **[Cloud deployment EN](docs/CLOUD_DEPLOYMENT_EN.md)** / **[CN](docs/CLOUD_DEPLOYMENT_CN.md)**.
610
611
611
612
### Suggested first session (product walkthrough)
612
613
@@ -758,7 +759,8 @@ Economic calendar data is free-first: QuantDinger uses the no-key AkShare/Wallst
0 commit comments