Skip to content
Back to search

QuantDinger

Open-source AI Trading OS, agent trading, and vibe trading, with Jev System One integration. Research, build Python strategies, backtest, and paper/live trade across crypto, stocks, and forex. Launch your own multi-tenant trading SaaS with built-in user management, billing, payments, and settlement.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/OpenByteInc/QuantDinger with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/OpenByteInc/QuantDinger'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/openbyteinc--quantdinger/badge.svg)](/listings/openbyteinc--quantdinger)

HTML

<a href="/listings/openbyteinc--quantdinger"><img src="/api/listings/openbyteinc--quantdinger/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Option A: prebuilt images

Prerequisites: Docker with Compose v2. Node.js and a local Python environment are not required.

Linux or macOS:

curl -fsSL https://raw.githubusercontent.com/OpenByteInc/QuantDinger/main/install.sh | bash

Windows PowerShell:

irm https://raw.githubusercontent.com/OpenByteInc/QuantDinger/main/install.ps1 | iex

The installer asks for the initial administrator credentials, generates the required secrets, downloads the GHCR Compose stack, and starts it.

Open:

- Web: <http://127.0.0.1:8888> - Mobile H5: <http://127.0.0.1:8889> - API health: <http://127.0.0.1:5000/api/health>

Docker administrator and settings notes

Detailed guides: [English](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_EN.md) | [中文](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_CN.md)

On a fresh database, the backend creates the initial administrator from `ADMIN_USER`, `ADMIN_PASSWORD`, and optional `ADMIN_EMAIL`. Passwords are stored as hashes, never as plaintext. An existing PostgreSQL volume is not overwritten: the backend only replaces the untouched legacy `quantdinger` / `123456` administrator when a non-default administrator is explicitly configured. It never overwrites an account whose password was already changed, and it refuses to promote an existing account that already uses the requested username.

Manual Docker deployments retain `quantdinger` / `123456` only for backward compatibility when the administrator variables are left at their defaults. This credential is not suitable for an internet-facing deployment; change it before first start or immediately after the first login. The one-command installer does not accept `123456` as the chosen password.

The Settings UI writes runtime configuration to `/app/.env`, which is the project-root `.env` on the host for both GHCR and source deployments. Current backend images automatically give runtime UID `10001` ownership and keep mode `600`. Do not use `chmod 755` or recursive `777`: these files contain passwords and API keys, and `755` still does not grant write access to UID `10001` when root owns the file.

Verify write access with:

docker compose exec -u 10001:10001 -T backend \
  sh -c 'test -w /app/.env && echo writable=yes || echo writable=no'

The hardened production override intentionally mounts `/app/.env` read-only. When using `docker-compose.production.yml`, manage configuration on the host and recreate the services instead of saving it from the Settings UI. See the [English guide](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_EN.md) or [中文指南](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_CN.md) for legacy-image recovery and rootless/NFS notes.

Option B: source checkout

git clone https://github.com/OpenByteInc/QuantDinger.git
cd QuantDinger
cp .env.example .env

Before the first start, replace the example values in the unified environment file:

| File | Required production values | | --- | --- | | `.env` | `SECRET_KEY`, `CREDENTIAL_ENCRYPTION_KEY`, administrator, PostgreSQL, Redis, and Grafana credentials |

After an update, `docker compose up` runs the one-shot `env-sync` service before database and Kafka initialization. It appends newly introduced settings, imports missing values from the legacy backend env files, preserves existing values and comments, and creates a timestamped backup only when the unified file changes. The command below remains available for a manual preview or maintenance run:

python scripts/sync_env.py --env-file .env --template .env.example --backup

For a manual one-time migration from older releases, add `--legacy backend_api_python/.env` (source deployment) or `--legacy backend.env` (old GHCR deployment). The old file is not deleted.

Generate independent secrets with:

python -c "import secrets; print(secrets.token_hex(32))"

Start the core stack from local backend source:

docker compose up -d --build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 983 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <a href="https://github.com/OpenByteInc/QuantDinger">
  3. <picture>
  4. <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/logo-dark.png">
  5. <img src="docs/screenshots/logo.png" alt="QuantDinger logo" width="420">
  6. </picture>
  7. </a>
  8. <p><strong>QuantDinger - Open-Source AI Quant Research Platform</strong></p>
  9. <p>Turn trading ideas into Python strategies, backtests, paper trading, live execution, and monitoring — all in one self-hosted stack.</p>
  10. <p><strong>QuantDinger is a product of Open Byte Inc.</strong></p>
  11. <p><em>AI research → Strategy code → Backtest → Paper/Live execution → Monitoring</em></p>
  12. <p>
  13. <a href="README.md"><strong>English</strong></a>
  14. ·
  15. <a href="README_CN.md"><strong>简体中文</strong></a>
  16. ·
  17. <a href="README_TW.md"><strong>繁體中文</strong></a>
  18. ·
  19. <a href="README_JA.md"><strong>日本語</strong></a>
  20. ·
  21. <a href="README_KO.md"><strong>한국어</strong></a>
  22. ·
  23. <a href="README_DE.md"><strong>Deutsch</strong></a>
  24. ·
  25. <a href="README_FR.md"><strong>Français</strong></a>
  26. ·
  27. <a href="README_RU.md"><strong>Русский</strong></a>
  28. ·
  29. <a href="README_AR.md"><strong>العربية</strong></a>
  30. ·
  31. <a href="README_TH.md"><strong>ไทย</strong></a>
  32. ·
  33. <a href="README_VI.md"><strong>Tiếng Việt</strong></a>
  34. </p>
  35. <p>
  36. <a href="docs/api/README.md"><strong>API</strong></a>
  37. ·
  38. <a href="docs/agent/README.md"><strong>AI Agents & MCP</strong></a>
  39. </p>
  40. <p>
  41. <a href="https://ai.quantdinger.com"><strong>Live App</strong></a>
  42. ·
  43. <a href="https://www.quantdinger.com"><strong>Website</strong></a>
  44. ·
  45. <a href="https://aws.amazon.com/marketplace/pp/prodview-ywy4zb5wnsari"><strong>Deploy on AWS Marketplace</strong></a>
  46. ·
  47. <a href="#watch-quantdinger-in-action"><strong>Video Demo</strong></a>
  48. ·
  49. <a href="mailto:support@quantdinger.com"><strong>Official Support Email</strong></a>
  50. </p>
  51. <p>
  52. <a href="https://t.me/quantdinger"><img src="https://img.shields.io/badge/Telegram-Join-26A5E4?style=flat-square&logo=telegram&logoColor=white" alt="Telegram"></a>
  53. <a href="https://discord.com/invite/tyx5B6TChr"><img src="https://img.shields.io/badge/Discord-Server-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a>
  54. <a href="https://youtube.com/@quantdinger"><img src="https://img.shields.io/badge/YouTube-%40quantdinger-FF0000?style=flat-square&logo=youtube&logoColor=white" alt="YouTube"></a>
  55. <a href="https://x.com/QuantDinger_EN"><img src="docs/badges/x-quantdinger.svg" alt="X @QuantDinger_EN"></a>
  56. </p>
  57. <p>
  58. <a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="Apache 2.0"></a>
  59. <a href="https://codecov.io/gh/OpenByteInc/QuantDinger"><img src="https://codecov.io/gh/OpenByteInc/QuantDinger/branch/main/graph/badge.svg" alt="Codecov"></a>
  60. <a href="https://scorecard.dev/viewer/?uri=github.com/OpenByteInc/QuantDinger"><img src="https://api.scorecard.dev/projects/github.com/OpenByteInc/QuantDinger/badge" alt="OpenSSF Scorecard"></a>
  61. <a href="https://www.bestpractices.dev/projects/15860"><img src="https://www.bestpractices.dev/projects/15860/baseline" alt="OpenSSF Baseline"></a>
  62. <a href="https://www.bestpractices.dev/projects/15860"><img src="https://www.bestpractices.dev/projects/15860/badge" alt="OpenSSF Best Practices"></a>
  63. <a href="https://sonarcloud.io/summary/new_code?id=OpenByteInc_QuantDinger"><img src="https://sonarcloud.io/api/project_badges/measure?project=OpenByteInc_QuantDinger&metric=alert_status" alt="SonarQube Cloud Quality Gate"></a>
  64. <a href="https://api.reuse.software/info/github.com/OpenByteInc/QuantDinger"><img src="https://api.reuse.software/badge/github.com/OpenByteInc/QuantDinger" alt="REUSE status"></a>
  65. <a href="docs/compliance/OPENCHAIN_ISO_5230_SELF_ASSESSMENT.md" title="Open Byte Inc. OpenChain ISO/IEC 5230 conformant program"><img src="https://img.shields.io/badge/OpenChain_ISO%2FIEC_5230-conformant-0B6B53?style=flat-square" alt="OpenChain ISO/IEC 5230 conformant"></a>
  66. <a href="docs/compliance/OPENCHAIN_ISO_18974_SELF_ASSESSMENT.md" title="Open Byte Inc. OpenChain ISO/IEC 18974 conformant program"><img src="https://img.shields.io/badge/OpenChain_ISO%2FIEC_18974-conformant-0B6B53?style=flat-square" alt="OpenChain ISO/IEC 18974 conformant"></a>
  67. <img src="docs/badges/python-3.12.svg" alt="Python 3.12">
  68. <img src="https://img.shields.io/badge/PostgreSQL-18-4169E1?style=flat-square&logo=postgresql&logoColor=white" alt="PostgreSQL 18">
  69. <img src="https://img.shields.io/badge/Redis-8-DC382D?style=flat-square&logo=redis&logoColor=white" alt="Redis 8">
  70. <a href="#jev-powered-pre-trade-decisions"><img src="https://img.shields.io/badge/JEV-Pre--trade%20Decisions-7C3AED?style=flat-square" alt="JEV pre-trade decisions"></a>
  71. <img src="docs/badges/docker-compose.svg" alt="Docker Compose">
  72. <a href="https://github.com/OpenByteInc/QuantDinger/releases/latest"><img src="docs/badges/latest-release.svg" alt="Latest release"></a>
  73. </p>
  74. <p>
  75. <a href="https://github.com/orgs/OpenByteInc/projects/1"><img src="https://img.shields.io/github/issues/OpenByteInc/QuantDinger/roadmap?style=flat-square&label=Roadmap%20items&color=5319E7" alt="Open roadmap items"></a>
  76. <a href="https://github.com/orgs/OpenByteInc/projects/1/views/4"><img src="https://img.shields.io/github/issues/OpenByteInc/QuantDinger/ready%20for%20contributors?style=flat-square&label=Ready%20tasks&color=0E8A16" alt="Tasks ready for contributors"></a>
  77. </p>
  78. <p><sub>SUPPORTED BY</sub></p>
  79. <p>
  80. <a href="https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=quantdinger" title="Atlas Cloud — AI inference sponsor">
  81. <picture>
  82. <source media="(prefers-color-scheme: dark)" srcset="https://www.atlascloud.ai/logo-white.svg">
  83. <img src="https://www.atlascloud.ai/logo.svg" alt="Atlas Cloud" width="134" align="middle">
  84. </picture>
  85. </a>
  86. &nbsp;&nbsp;&nbsp;&nbsp;
  87. <a href="https://aws.amazon.com/marketplace/pp/prodview-ywy4zb5wnsari" title="Deploy QuantDinger on AWS Marketplace">
  88. <picture>
  89. <source media="(prefers-color-scheme: dark)" srcset="https://a0.awsstatic.com/libra-css/images/logos/aws_smile-header-desktop-en-white_59x35.png">
  90. <img src="https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg" alt="Amazon Web Services" width="54" align="middle">
  91. </picture>
  92. </a>
  93. &nbsp;&nbsp;&nbsp;&nbsp;
  94. <a href="https://openai.com/" title="OpenAI — open-source development tooling support">
  95. <picture>
  96. <source media="(prefers-color-scheme: dark)" srcset="docs/badges/openai-wordmark-white.svg">
  97. <img src="docs/badges/openai-wordmark-black.svg" alt="OpenAI" width="150" align="middle">
  98. </picture>
  99. </a>
  100. </p>
  101. <p>
  102. <a href="https://www.nvidia.com/en-us/startups/" title="Open Byte Inc. has joined NVIDIA Inception">
  103. <picture>
  104. <source media="(prefers-color-scheme: dark)" srcset="docs/badges/nvidia-inception-member-dark.png">
  105. <img src="docs/badges/nvidia-inception-member.png" alt="NVIDIA Inception Program" width="64" align="middle">
  106. </picture>
  107. </a>
  108. &nbsp;&nbsp;
  109. <strong>Open Byte Inc. has joined NVIDIA Inception.</strong>
  110. </p>
  111. </div>
  112. > **Want to contribute?** Explore the
  113. > [public roadmap](https://github.com/orgs/OpenByteInc/projects/1) or claim a
  114. > scoped task from [Ready for contributors](https://github.com/orgs/OpenByteInc/projects/1/views/4).
  115. > QuantDinger can submit real orders when live trading is explicitly enabled.
  116. > Start with paper trading, use restricted API keys, and review the risk and
  117. > compliance requirements for your jurisdiction. This project does not provide
  118. > investment advice.
  119. ## Watch QuantDinger in action
  120. <p align="center">
  121. <a href="https://youtu.be/y9EiCZSaIt0">
  122. <img src="docs/screenshots/quantdinger-youtube-overview.png" alt="Watch the latest QuantDinger overview on YouTube" width="800">
  123. </a>
  124. <br>
  125. <strong><a href="https://youtu.be/y9EiCZSaIt0">▶ Watch the latest QuantDinger product tour on YouTube</a></strong>
  126. </p>
  127. ## What QuantDinger is
  128. QuantDinger is an **open-source AI Trading OS** for independent traders, Python
  129. strategy authors, and small teams. Its local-first, self-hosted design keeps
  130. market data, strategy code, broker credentials, and deployment under the
  131. operator's control.
  132. The project combines:
  133. - multi-provider AI market research and analysis;
  134. - Python indicators and Strategy API V2 development;
  135. - server-side backtesting and experiment workflows;
  136. - paper and live execution across crypto exchanges and traditional brokers;
  137. - web, mobile H5, human API, Agent Gateway, and MCP access;
  138. - PostgreSQL-backed state, durable workers, audit logs, and optional monitoring.
  139. It is not a black-box signal service. Strategy code, risk settings, credentials,
  140. and deployment remain under the operator's control.
  141. ### Strategy evolution and signal-only virtual accounts
  142. - **Factor Lab** loads one point-in-time universe panel once and benchmarks up
  143. to 40 registered technical, fundamental, TA-Lib, or Qlib factors. It uses a
  144. time-ordered holdout, out-of-sample IC retention, Benjamini-Hochberg
  145. false-discovery control, cost-aware scoring, factor-life-cycle labels, and
  146. cross-factor IC correlation. The same workflow is available from the web UI,
  147. Human API, Agent Gateway, and MCP.
  148. - **Strategy evolution** searches declared tunable parameters with random,
  149. grid, or TPE optimization, using bar-count walk-forward validation and a final
  150. blind holdout. Jobs run asynchronously with per-strategy history, automatic
  151. pruning, composite scoring, PBO, Deflated Sharpe, block-bootstrap Monte Carlo,
  152. and transaction-cost stress tests. Results compare parameter robustness; they
  153. do not forecast future returns.
  154. - **Signal-only virtual accounts** turn notification-mode signals into internal
  155. virtual orders, fills, positions, trade records, PnL, and an equity curve. They
  156. never connect to a broker or submit live orders. Each fill uses a fixed 0.05%
  157. commission on executed notional and 0.05% adverse slippage; leverage is not
  158. charged a second time in the commission calculation.
  159. ## What changed in v5
  160. The v5 backend is organized around explicit runtime and operational boundaries:
  161. - the HTTP API no longer owns long-running trading or scheduler loops;
  162. - trading, scheduling, Celery jobs, and migrations run as separate processes;
  163. - Celery handles finite, retryable work while long-lived strategy runtimes stay
  164. in the trading worker;
  165. - cache Redis and durable job Redis use separate instances and eviction policies;
  166. - high-risk API contracts are represented in OpenAPI and protected by tests;
  167. - JSON logs, request IDs, Prometheus metrics, dashboards, and alert rules are
  168. available through an optional observability overlay;
  169. - the production overlay runs backend processes as a non-root user with a
  170. read-only root filesystem, dropped capabilities, and resource limits;
  171. - CI checks syntax, lint, tests, release gates, Compose files, dependencies,
  172. source security, secrets, API compatibility, version drift, and text encoding.
  173. The source version is declared in [`VERSION`](VERSION). Git release tags use the
  174. same semantic version with a leading `v`, for example `v5.0.1`.
  175. ## Architecture
  176. <p align="center">
  177. <img src="docs/screenshots/architecture-v5.png" alt="QuantDinger v5 architecture covering clients, Agent Gateway, core platform, distributed runtime workers, Kafka, infrastructure, observability, and the closed-loop trading workflow" width="100%">
  178. </p>
  179. <p align="center"><sub>The editable source is <a href="docs/screenshots/architecture-v5.svg">architecture-v5.svg</a>; the Mermaid topology below is the detailed runtime source of truth.</sub></p>
  180. The static diagram above is the product-level view. The runtime topology below
  181. is the current source of truth for container ownership and event/data flow.
  182. ```mermaid
  183. flowchart TB
  184. C["Web / Mobile / API / MCP clients"]
  185. FE["Nginx frontend services"]
  186. API["Flask + Gunicorn API"]
  187. PG[("PostgreSQL")]
  188. CACHE[("Redis cache")]
  189. JOBS[("Redis jobs")]
  190. KAFKA[("Kafka event backbone")]
  191. TW["Trading workers\ncontrol, realtime, execution, grid actors"]
  192. DISPATCH["Strategy dispatcher workers"]
  193. EVAL["Strategy evaluator workers\nhot bar runtimes"]
  194. AUDIT["Kafka audit worker"]
  195. SW["Scheduler worker"]
  196. CW["Celery worker"]
  197. BEAT["Celery beat"]
  198. PROM["Prometheus"]
  199. GRAF["Grafana"]
  200. ALERT["Alertmanager"]
  201. C --> FE --> API
  202. API --> PG
  203. API --> CACHE
  204. API -->|"durable commands"| PG
  205. TW -->|"leases, order intents, fills, grid actor state"| PG
  206. TW -->|"closed bars and lifecycle events"| KAFKA
  207. KAFKA --> DISPATCH --> KAFKA
  208. KAFKA --> EVAL
  209. EVAL -->|"inbox, leases, checkpoints, order intents"| PG
  210. KAFKA --> AUDIT --> PG
  211. PG -->|"owned pending orders"| TW
  212. SW -->|"schedules, monitoring, heartbeats"| PG
  213. API -->|"finite async jobs"| JOBS
  214. BEAT --> JOBS --> CW
  215. CW --> PG
  216. API -. metrics .-> PROM
  217. PG -. exporter .-> PROM
  218. CACHE -. exporter .-> PROM
  219. JOBS -. exporter .-> PROM
  220. PROM --> GRAF
  221. PROM --> ALERT
  222. ```
  223. One backend image is reused by several containers with different commands:
  224. | Process | Responsibility |
  225. | --- | --- |
  226. | `migration` | Applies the database schema and exits before application services start. |
  227. | `kafka-init` | Creates the versioned runtime topics and exits before event consumers start. |
  228. | `backend` | Handles HTTP, authentication, validation, and durable command submission. |
  229. | `trading-worker` | Owns control/realtime runtimes, exchange sessions, the fenced order gateway, reconciliation, and durable grid actors. |
  230. | `strategy-dispatcher-worker` | Converts closed-bar events into stable strategy-shard evaluation batches. |
  231. | `strategy-evaluator-worker` | Owns hot distributed bar runtimes and evaluates fenced strategy inbox events. |
  232. | `kafka-audit-worker` | Validates and records the versioned event stream independently of execution. |
  233. | `scheduler-worker` | Runs portfolio, deployment, payment, and signal schedules. |
  234. | `celery-worker` | Executes finite AI, report, and maintenance jobs. |
  235. | `celery-backtest-worker` | Executes backtests, factor research, and experiments; recycles its child after every task. |
  236. | `celery-beat` | Dispatches periodic Celery tasks. |
  237. See [Backend process roles](docs/architecture/PROCESS_ROLES_AND_TASKS.md),
  238. [architecture](docs/architecture/ARCHITECTURE.md), and
  239. [concurrency model](docs/architecture/CONCURRENCY_MODEL.md) for the ownership rules.
  240. Use the [distributed runtime deployment and scaling guide](docs/deployment/DISTRIBUTED_RUNTIME_SCALING.md)
  241. before changing replica counts or moving the stack to multiple hosts.
  242. ## Quick start
  243. If you are unsure whether to choose Windows, Linux/macOS, a cloud server, SaaS,
  244. or a mobile client, start with the
  245. [installation and deployment overview](docs/getting-started/INSTALLATION.md).
  246. Each path covers installation, verification, upgrades, post-install setup, and troubleshooting.
  247. ### Fastest cloud deployment: AWS Marketplace
  248. <p align="center">
  249. <a href="https://aws.amazon.com/marketplace/pp/prodview-ywy4zb5wnsari"><img src="https://img.shields.io/badge/AWS%20Marketplace-Deploy%20QuantDinger-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white" alt="Deploy QuantDinger from AWS Marketplace"></a>
  250. </p>
  251. Launch the free QuantDinger software from its public
  252. [AWS Marketplace product page](https://aws.amazon.com/marketplace/pp/prodview-ywy4zb5wnsari).
  253. The Marketplace delivery option provisions the single-node container stack and
  254. its required AWS infrastructure through CloudFormation. QuantDinger has no
  255. software fee; normal AWS infrastructure charges still apply. See the
  256. [deployment and upgrade guide](docs/deployment/AWS_MARKETPLACE_DEPLOYMENT.md)
  257. for first login, backups, upgrades, rollback, and cost notes.
  258. ### Option A: prebuilt images
  259. Prerequisites: Docker with Compose v2. Node.js and a local Python environment are
  260. not required.
  261. Linux or macOS:
  262. ```bash
  263. curl -fsSL https://raw.githubusercontent.com/OpenByteInc/QuantDinger/main/install.sh | bash
  264. ```
  265. Windows PowerShell:
  266. ```powershell
  267. irm https://raw.githubusercontent.com/OpenByteInc/QuantDinger/main/install.ps1 | iex
  268. ```
  269. The installer asks for the initial administrator credentials, generates the
  270. required secrets, downloads the GHCR Compose stack, and starts it.
  271. Open:
  272. - Web: <http://127.0.0.1:8888>
  273. - Mobile H5: <http://127.0.0.1:8889>
  274. - API health: <http://127.0.0.1:5000/api/health>
  275. ### Docker administrator and settings notes
  276. Detailed guides: [English](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_EN.md) |
  277. [中文](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_CN.md)
  278. On a fresh database, the backend creates the initial administrator from
  279. `ADMIN_USER`, `ADMIN_PASSWORD`, and optional `ADMIN_EMAIL`. Passwords are stored
  280. as hashes, never as plaintext. An existing PostgreSQL volume is not overwritten:
  281. the backend only replaces the untouched legacy `quantdinger` / `123456`
  282. administrator when a non-default administrator is explicitly configured. It
  283. never overwrites an account whose password was already changed, and it refuses
  284. to promote an existing account that already uses the requested username.
  285. Manual Docker deployments retain `quantdinger` / `123456` only for backward
  286. compatibility when the administrator variables are left at their defaults. This
  287. credential is not suitable for an internet-facing deployment; change it before
  288. first start or immediately after the first login. The one-command installer does
  289. not accept `123456` as the chosen password.
  290. The Settings UI writes runtime configuration to `/app/.env`, which is the
  291. project-root `.env` on the host for both GHCR and source deployments. Current backend images automatically give runtime UID
  292. `10001` ownership and keep mode `600`. Do not use `chmod 755` or recursive `777`:
  293. these files contain passwords and API keys, and `755` still does not grant write
  294. access to UID `10001` when root owns the file.
  295. Verify write access with:
  296. ```bash
  297. docker compose exec -u 10001:10001 -T backend \
  298. sh -c 'test -w /app/.env && echo writable=yes || echo writable=no'
  299. ```
  300. The hardened production override intentionally mounts `/app/.env` read-only.
  301. When using `docker-compose.production.yml`, manage configuration on the host and
  302. recreate the services instead of saving it from the Settings UI. See the
  303. [English guide](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_EN.md) or
  304. [中文指南](docs/deployment/ADMIN_AND_SETTINGS_TROUBLESHOOTING_CN.md) for
  305. legacy-image recovery and rootless/NFS notes.
  306. ### Option B: source checkout
  307. ```bash
  308. git clone https://github.com/OpenByteInc/QuantDinger.git
  309. cd QuantDinger
  310. python scripts/bootstrap_env.py
  311. ```
  312. Before the first start, review the unified environment file. The bootstrap command
  313. already generates the PostgreSQL, session-signing, and credential-encryption
  314. secrets; set the administrator credentials and review any production-only
  315. integrations:
  316. | File | Required production values |
  317. | --- | --- |
  318. | `.env` | Administrator credentials; optional Redis and Grafana credentials; deployment-specific URLs and integrations |
  319. After pulling an update, initialize the unified environment before running any
  320. Compose command. This one-time step is required when upgrading from releases
  321. that relied on the former built-in PostgreSQL password:
  322. ```bash
  323. git pull --ff-only
  324. python3 scripts/bootstrap_env.py
  325. docker compose up -d --build
  326. ```
  327. The bootstrap command preserves existing credentials and can recover the former
  328. PostgreSQL password from a legacy `DATABASE_URL` or the existing database
  329. container. If it detects an existing data volume but cannot recover the password,
  330. it stops instead of disconnecting the database. Do not invent a replacement
  331. password and do not delete the volume.
  332. After bootstrap, Compose runs the one-shot `env-sync` service before database and
  333. Kafka initialization. It appends newly introduced settings, imports missing
  334. values from legacy backend environment files, preserves existing values and
  335. comments, and creates a timestamped backup only when the unified file changes.
  336. The command below remains available for a manual preview or maintenance run:
  337. ```bash
  338. python scripts/sync_env.py --env-file .env --template .env.example --backup
  339. ```
  340. For a manual one-time migration from older releases, add
  341. `--legacy backend_api_python/.env` (source deployment) or `--legacy backend.env`
  342. (old GHCR deployment). The old file is not deleted.
  343. The bootstrap command creates `.env`, preserves existing values during upgrades,
  344. and generates independent PostgreSQL, session, and credential-encryption secrets.
  345. To generate another independent secret manually:
  346. ```bash
  347. python -c "import secrets; print(secrets.token_hex(32))"
  348. ```
  349. Start the core stack from local backend source:
  350. ```bash
  351. docker compose up -d --build
  352. docker compose ps
  353. ```
  354. The base stack does not start Prometheus, Grafana, or Alertmanager. This keeps
  355. the default open-source installation smaller.
  356. For complete platform instructions, see [Windows](docs/deployment/WINDOWS_INSTALLATION.md),
  357. [Linux and macOS](docs/deployment/LINUX_MACOS_INSTALLATION.md),
  358. [cloud](docs/deployment/CLOUD_DEPLOYMENT_EN.md),
  359. [SaaS](docs/deployment/SAAS_DEPLOYMENT.md), and
  360. [mobile client deployment](docs/deployment/MOBILE_CLIENT_DEPLOYMENT.md). Continue with
  361. [post-installation setup](docs/getting-started/POST_INSTALL_SETUP.md); use the
  362. [installation FAQ](docs/deployment/INSTALLATION_FAQ.md) and
  363. [installation troubleshooting](docs/deployment/INSTALL_TROUBLESHOOTING.md) when needed.
  364. After the first login, follow the
  365. [30-minute quickstart](docs/getting-started/QUICKSTART_30_MINUTES.md) to configure
  366. the core system and produce a first research result and backtest. Production
  367. administrators should also read the
  368. [configuration reference](docs/deployment/CONFIGURATION_REFERENCE.md),
  369. [backup, restore, and migration guide](docs/deployment/BACKUP_RESTORE_MIGRATION.md),
  370. and [upgrade and rollback guide](docs/deployment/UPGRADE_ROLLBACK.md).
  371. For the free AWS Marketplace single-node delivery option, including first
  372. launch, upgrades, backup, rollback, and cost notes, see the
  373. [AWS Marketplace deployment guide](docs/deployment/AWS_MARKETPLACE_DEPLOYMENT.md).
  374. ## Production deployment
  375. Validate secrets before starting a production stack:
  376. ```bash
  377. python backend_api_python/scripts/check_production_config.py \
  378. --env-file .env
  379. ```
  380. Start the hardened runtime with optional observability:
  381. ```bash
  382. docker compose \
  383. -f docker-compose.yml \
  384. -f docker-compose.production.yml \
  385. -f docker-compose.observability.yml \
  386. up -d --build
  387. ```
  388. Omit `docker-compose.observability.yml` when the host is resource-constrained or
  389. monitoring is provided externally.
  390. Production rules:
  391. - expose only a TLS reverse proxy on ports 80/443;
  392. - keep PostgreSQL, both Redis instances, Prometheus, Grafana, and Alertmanager
  393. off the public internet;
  394. - do not deploy with example passwords or empty encryption keys;
  395. - back up PostgreSQL and the durable `redis-jobs` volume;
  396. - keep cache Redis disposable and never use it as the Celery broker;
  397. - review worker health and application readiness after every deployment.
  398. The full checklist is in [Production hardening](docs/deployment/PRODUCTION_HARDENING.md).
  399. ## Local endpoints
  400. All published ports bind to loopback by default.
  401. | Service | Default URL | Purpose |
  402. | --- | --- | --- |
  403. | Web | <http://127.0.0.1:8888> | Desktop web client and same-origin API proxy. |
  404. | Mobile H5 | <http://127.0.0.1:8889> | Mobile web client and same-origin API proxy. |
  405. | Backend | <http://127.0.0.1:5000> | Direct API access and health endpoints. |
  406. | Grafana | <http://127.0.0.1:3000> | Dashboards; available only with the observability overlay. |
  407. | Prometheus | <http://127.0.0.1:9090> | Metrics storage and queries; optional. |
  408. | Alertmanager | <http://127.0.0.1:9093> | Alert grouping, silencing, and delivery; optional. |
  409. Container-only ports such as the job Redis and exporters are not published to
  410. the host.
  411. ## Observability
  412. The monitoring stack is optional by design:
  413. - **Prometheus** collects API, worker, PostgreSQL, and Redis metrics.
  414. - **Grafana** turns those metrics into operator dashboards.
  415. - **Alertmanager** groups alerts, manages silences, and sends notifications once
  416. a receiver is configured.
  417. Start it for local diagnostics without the production overlay:
  418. ```bash
  419. docker compose \
  420. -f docker-compose.yml \
  421. -f docker-compose.observability.yml \
  422. up -d
  423. ```
  424. Monitoring services stay on `127.0.0.1`. Use a VPN, SSH tunnel, or authenticated
  425. reverse proxy for remote administration. See
  426. [Observability](docs/deployment/OBSERVABILITY.md) for dashboards, alerts, retention, and
  427. receiver configuration.
  428. ## Security model
  429. - Broker credentials and MFA secrets are encrypted with a stable
  430. `CREDENTIAL_ENCRYPTION_KEY`.
  431. - Agent tokens are hashed, scoped, rate-limited, and audit-logged.
  432. - Agent trading is paper-only by default; live access requires both token and
  433. server-side authorization.
  434. - Long-running strategy ownership uses leases, heartbeats, and fencing tokens.
  435. - Production containers run without root privileges or Linux capabilities.
  436. - Host port defaults are loopback-only; public access should terminate at a TLS
  437. reverse proxy.
  438. Report vulnerabilities privately according to [SECURITY.md](SECURITY.md). Do
  439. not include credentials, account data, or exploitable details in public issues.
  440. ## Strategy and integration surfaces
  441. | Area | Current surface |
  442. | --- | --- |
  443. | Indicators | Python chart overlays, markers, bands, and signals. |
  444. | Strategies | Strategy API V2 intents, sizing, risk, backtests, and live runtime. |
  445. | Crypto | Binance, OKX, Bitget, Bybit, Gate, HTX, and adapter extensions. |
  446. | Traditional brokers | IBKR and Alpaca workflows. |
  447. | AI providers | OpenRouter, OpenAI-compatible APIs, Google, DeepSeek, Grok, MiniMax, and custom endpoints. |
  448. | Automation | Human API, Agent Gateway, MCP server, Celery jobs, schedules, and notifications. |
  449. Start with the [Indicator guide](docs/trading/INDICATOR_DEV_GUIDE.md),
  450. [Strategy guide](docs/trading/STRATEGY_DEV_GUIDE.md), and
  451. [Extension guide](docs/architecture/EXTENSION_GUIDE.md).
  452. ## JEV-powered pre-trade decisions
  453. QuantDinger can place a structured AI decision gate directly in front of live
  454. entry orders. Enable **AI Decision Filter** when creating a regular live
  455. strategy. Before a strategy entry reaches the exchange,
  456. QuantDinger sends the order, strategy context, exposure, positions, and budget
  457. state to [TypeSafe Jev](https://docs.typesafe.ai/introduction). Jev returns typed
  458. Choice results, probabilities, and confidence instead of prose that must be
  459. parsed. The app shows the provider, checks, result, confidence, latency, and
  460. reason in an auditable decision timeline.
  461. | Previous LLM-only gate | JEV decision gate |
  462. | --- | --- |
  463. | Generate prose or JSON and recover a decision through parsing | Receive a typed Choice with the selected outcome, full probabilities, and confidence |
  464. | One opaque answer is difficult to inspect after execution | Independent entry and risk checks are stored with the order context and latency |
  465. | Provider failure can accidentally block position management | Provider failure is audited and fails open, while every exit bypasses AI |
  466. The execution policy stays in QuantDinger code: rejected entries never reach
  467. the exchange; exits, stop-loss, take-profit, and emergency actions bypass the
  468. filter. Grid, DCA, and martingale runtimes are excluded from this first version.
  469. When Jev is not configured, QuantDinger tries the configured LLM. If no AI
  470. provider is available, the order is allowed and the fail-open result is logged,
  471. so an AI outage cannot trap an existing position.
  472. ### Decision flow
  473. ```mermaid
  474. flowchart TD
  475. A["Strategy entry signal"] --> B["Deterministic risk and order budget checks"]
  476. B -->|"Basic checks fail"| R["Reject order"]
  477. B -->|"Basic checks pass"| C["Build Decision Context V2"]
  478. C --> C1["Strategy parameters and signal rationale"]
  479. C --> C2["Multi-timeframe market data and indicators"]
  480. C --> C3["Positions, exposure, equity, and drawdown"]
  481. C --> C4["Recent PnL and consecutive losses"]
  482. C --> C5["Take-profit, stop-loss, and execution conditions"]
  483. C1 --> D
  484. C2 --> D
  485. C3 --> D
  486. C4 --> D
  487. C5 --> D
  488. D{"JEV configured?"}
  489. D -->|"Yes"| E["JEV System One"]
  490. E --> E1["Evidence quality"]
  491. E --> E2["Signal consistency"]
  492. E --> E3["Market regime"]
  493. E --> E4["Account risk"]
  494. E --> E5["Execution quality"]
  495. E --> E6["Entry decision: pass/reject"]
  496. E1 --> F["Validate schema, probabilities, and confidence"]
  497. E2 --> F
  498. E3 --> F
  499. E4 --> F
  500. E5 --> F
  501. E6 --> F
  502. F -->|"Valid result and confidence threshold met"| G["Deterministic decision converger"]
  503. F -->|"Timeout, error, invalid format, or low confidence"| H
  504. D -->|"No"| H{"LLM configured?"}
  505. H -->|"Yes"| I["LLM reads the same context"]
  506. I --> J["Require strict JSON output"]
  507. J --> K{"decision"}
  508. H -->|"No"| O["Fail open and log the reason"]
  509. G -->|"PASS"| P["Enter pending order queue"]
  510. G -->|"REJECT"| R
  511. K -->|"pass"| P
  512. K -->|"reject"| R
  513. K -->|"Invalid output or provider failure"| O
  514. P --> Q["Submit to exchange asynchronously"]
  515. R --> S["Record ai_rejected and the decision trace"]
  516. O --> T["Place order normally and record provider unavailable"]
  517. ```
  518. Configure `JEV_ENABLED`, `JEV_API_KEY`, `JEV_BASE_URL`, `JEV_MODEL`, and
  519. `JEV_TIMEOUT_SECONDS` in **System Settings → AI / LLM**. When JEV is disabled,
  520. the decision filter uses the configured LLM directly. TypeSafe documents the
  521. HTTP contract at [`POST /v1/systemone`](https://docs.typesafe.ai/introduction/quickstart).
  522. ## AI agents and MCP
  523. The Agent Gateway is exposed under `/api/agent/v1`. The included MCP server lets
  524. clients such as Cursor, Claude Code, and Codex call approved tools without
  525. receiving broker credentials or administrator JWTs.
  526. Live trading through an agent requires all of the following:
  527. 1. a token with trading scope;
  528. 2. `paper_only=false` on that token;
  529. 3. `AGENT_LIVE_TRADING_ENABLED=true` on the server;
  530. 4. operator-configured limits and allowlists.
  531. See [MCP setup](docs/agent/MCP_SETUP.md),
  532. [Agent quick start](docs/agent/AGENT_QUICKSTART.md), and the
  533. [Agent OpenAPI document](docs/agent/agent-openapi.json).
  534. ## Development
  535. Backend development uses Python 3.12:
  536. ```bash
  537. cd backend_api_python
  538. python -m venv .venv
  539. python -m pip install -r requirements-dev.txt
  540. python -m pytest -m "not integration and not stress" --ignore=tests/release_gate -q
  541. ruff check app scripts tests
  542. ```
  543. Useful repository checks:
  544. ```bash
  545. python scripts/check_version.py
  546. python scripts/check_mojibake.py
  547. docker compose -f docker-compose.yml config -q
  548. docker compose -f docker-compose.yml -f docker-compose.production.yml -f docker-compose.observability.yml config -q
  549. ```
  550. API changes should follow [API conventions](docs/architecture/API_CONVENTIONS.md), update the
  551. OpenAPI artifact when required, and pass the compatibility workflow.
  552. ## Repository layout
  553. This repository contains the backend, worker processes, deployment definitions,
  554. operations configuration, documentation, and MCP server. The desktop and mobile
  555. client source code live in separate repositories; this repository consumes their
  556. published images in the Compose stacks.
  557. ```text
  558. QuantDinger/
  559. |-- .github/workflows/ CI, security, compatibility, and release checks
  560. |-- backend_api_python/ Backend application and all backend processes
  561. | |-- app/
  562. | | |-- __init__.py Flask application factory and core wiring
  563. | | |-- startup.py Process-aware startup hooks and service singletons
  564. | | |-- celery_app.py Celery application and task registration
  565. | | |-- commands/ Migration, scheduler, trading, and health entrypoints
  566. | | |-- config/ Environment-backed database, Redis, and provider config
  567. | | |-- routes/ Human HTTP API route facades
  568. | | | `-- agent_v1/ Scoped Agent Gateway API under /api/agent/v1
  569. | | |-- openapi/ OpenAPI schemas, tags, registration, and export support
  570. | | |-- services/ Domain workflows and third-party integrations
  571. | | | |-- backtest_engine/ Backtest execution components
  572. | | | |-- factors/ Point-in-time factor research and diagnostics
  573. | | | |-- strategy_evolution/ Parameter search, walk-forward validation, and robustness tests
  574. | | | |-- pending_orders/ Queued order submission, recovery, and reconciliation
  575. | | | |-- live_trading/ Normalized crypto exchange adapters
  576. | | | |-- alpaca_trading/ Alpaca broker integration
  577. | | | |-- ibkr_trading/ Interactive Brokers integration
  578. | | | |-- strategy_runtime/ Strategy signals, intents, execution, and state
  579. | | | |-- strategy_v2/ Versioned strategy contracts and runtime services
  580. | | | `-- virtual_trading.py Isolated signal-mode account, positions, and fills
  581. | | |-- data_sources/ Raw market-data source adapters
  582. | | |-- data_providers/ Aggregated market, macro, news, and sentiment providers
  583. | | |-- markets/ Market and symbol normalization
  584. | | |-- tasks/ Finite, retryable Celery jobs
  585. | | |-- workers/ Long-lived worker process shells
  586. | | |-- runtime/ Process-role and ownership helpers
  587. | | |-- observability/ Request context, metrics, and HTTP instrumentation
  588. | | `-- utils/ Shared low-level database, cache, auth, and logging helpers
  589. | |-- migrations/ PostgreSQL schema and seed migrations
  590. | |-- scripts/ Backend maintenance and validation commands
  591. | |-- tests/ Unit, contract, integration, and release-gate tests
  592. | |-- run.py Local Flask and Gunicorn application entrypoint
  593. | |-- Dockerfile Shared image for API and worker containers
  594. | `-- docker-entrypoint.sh Container command dispatcher
  595. |-- docs/
  596. | |-- architecture/ Boundaries, concurrency, API, and extension design
  597. | |-- deployment/ Installation, production, and observability operations
  598. | |-- trading/ Strategy and indicator development guides
  599. | |-- strategies/ Strategy authoring and validation references
  600. | |-- api/ Human API documentation
  601. | |-- agent/ Agent Gateway and MCP documentation
  602. | |-- getting-started/ Onboarding and first-run guides
  603. | |-- product/ Product workflows and feature documentation
  604. | `-- security/ Security model and operational guidance
  605. |-- mcp_server/ Standalone QuantDinger MCP server package
  606. | |-- src/quantdinger_mcp/ MCP server and security implementation
  607. | `-- tests/ MCP contract and security tests
  608. |-- ops/ Runtime operations configuration
  609. | |-- prometheus/ Scrape configuration and alert rules
  610. | |-- grafana/ Provisioned data sources and dashboards
  611. | `-- alertmanager/ Alert routing configuration
  612. |-- scripts/ Repository-level version, encoding, and setup checks
  613. |-- docker-compose.yml Core local/source stack
  614. |-- docker-compose.ghcr.yml Prebuilt-image installation stack
  615. |-- docker-compose.production.yml Production hardening overlay
  616. |-- docker-compose.observability.yml Optional monitoring overlay
  617. |-- install.sh / install.ps1 Linux/macOS and Windows installers
  618. `-- VERSION Canonical source version
  619. ```
  620. ### Main execution paths
  621. | Flow | Path through the repository |
  622. | --- | --- |
  623. | Synchronous API request | `app/routes` -> `app/services` -> database, cache, market-data, or trading adapter |
  624. | Durable strategy command | API route -> PostgreSQL command record -> `trading-worker` -> strategy runtime and broker adapter |
  625. | Finite background job | API or Celery beat -> job Redis -> `app/tasks` in the queue-specific Celery worker -> PostgreSQL result |
  626. | Scheduled domain work | `app/commands/scheduler.py` -> scheduling services -> durable state and notifications |
  627. | Monitoring | API and workers -> `app/observability` metrics -> Prometheus -> Grafana and Alertmanager |
  628. | Agent or MCP call | MCP client -> `mcp_server` -> `/api/agent/v1` -> the same service layer used by human APIs |
  629. Long-lived trading loops belong to the trading worker. Finite, retryable work
  630. belongs to Celery. HTTP routes validate and delegate; they must not own trading
  631. loops, exchange-specific behavior, or large database workflows.
  632. ### Where changes belong
  633. | Change | Primary location | Usually update as well |
  634. | --- | --- | --- |
  635. | Add or modify an HTTP endpoint | `backend_api_python/app/routes/` | `app/openapi/`, route/contract tests, API docs |
  636. | Add a business workflow | `backend_api_python/app/services/` | focused service tests |
  637. | Add an exchange or broker integration | `app/services/live_trading/` or the broker package | credential policy, adapter tests, docs |
  638. | Add a market-data source | `app/data_sources/` | provider aggregation, cache keys, tests |
  639. | Add dashboard, news, or macro aggregation | `app/data_providers/` | route facade and cache policy |
  640. | Add a finite asynchronous task | `app/tasks/` | `celery_app.py`, queue routing, task tests |
  641. | Add long-lived process behavior | `app/workers/`, `app/commands/`, or `app/runtime/` | Compose command, health checks, ownership tests |
  642. | Change the database schema | `backend_api_python/migrations/` | migration/release-gate tests and docs |
  643. | Add metrics or alerts | `app/observability/` and `ops/` | dashboard, alert rule, observability docs |
  644. | Add an MCP tool | `mcp_server/src/quantdinger_mcp/` | Agent Gateway scope, security tests, agent docs |
  645. The web and mobile repositories publish their own GHCR images. Node.js is only
  646. needed when building those clients from source. For deeper ownership rules, read
  647. [Architecture](docs/architecture/ARCHITECTURE.md),
  648. [Module boundaries](docs/architecture/MODULE_BOUNDARIES.md), and
  649. [Process roles](docs/architecture/PROCESS_ROLES_AND_TASKS.md).
  650. ## Documentation
  651. Project engineering and assurance documents:
  652. - [Development environment](DEVELOPMENT.md)
  653. - [Testing policy](docs/getting-started/TESTING.md)
  654. - [Architecture](docs/architecture/ARCHITECTURE.md)
  655. - [Governance](GOVERNANCE.md) and [maintainers](MAINTAINERS.md)
  656. - [Security policy](SECURITY.md)
  657. - [Security assessment](docs/security/SECURITY_ASSESSMENT.md)
  658. - [Secure development practices](docs/security/SECURE_DEVELOPMENT.md)
  659. - [Dependency management policy](docs/security/DEPENDENCY_POLICY.md)
  660. - [Open source compliance and security assurance program](docs/compliance/README.md)
  661. - [Release history](CHANGELOG.md)
  662. The maintained documentation index is available at [`docs/README.md`](docs/README.md).
  663. | Topic | Document |
  664. | --- | --- |
  665. | Installation and platform choice | [Installation overview](docs/getting-started/INSTALLATION.md) |
  666. | 30-minute quickstart | [First complete workflow](docs/getting-started/QUICKSTART_30_MINUTES.md) |
  667. | System configuration | [Configuration reference](docs/deployment/CONFIGURATION_REFERENCE.md) |
  668. | External services | [Broker, data, and AI integrations](docs/deployment/INTEGRATION_GUIDE.md) |
  669. | Backup and migration | [Backup, restore, and migration](docs/deployment/BACKUP_RESTORE_MIGRATION.md) |
  670. | Upgrade and rollback | [Upgrade and rollback](docs/deployment/UPGRADE_ROLLBACK.md) |
  671. | Incident diagnosis | [Error knowledge base](docs/deployment/ERROR_KNOWLEDGE_BASE.md) |
  672. | Contributor architecture | [Architecture](docs/architecture/ARCHITECTURE.md) |
  673. | Module ownership | [Module boundaries](docs/architecture/MODULE_BOUNDARIES.md) |
  674. | Process and task ownership | [Process roles](docs/architecture/PROCESS_ROLES_AND_TASKS.md) |
  675. | Production runtime | [Production hardening](docs/deployment/PRODUCTION_HARDENING.md) |
  676. | Metrics and alerts | [Observability](docs/deployment/OBSERVABILITY.md) |
  677. | Human API contracts | [API conventions](docs/architecture/API_CONVENTIONS.md) |
  678. | OpenAPI artifacts | [API documentation](docs/api/README.md) |
  679. | Strategy development | [Strategy guide](docs/trading/STRATEGY_DEV_GUIDE.md) |
  680. | Indicator development | [Indicator guide](docs/trading/INDICATOR_DEV_GUIDE.md) |
  681. | MCP and agents | [Agent documentation](docs/agent/README.md) |
  682. | Cloud deployment | [Cloud deployment](docs/deployment/CLOUD_DEPLOYMENT_EN.md) |
  683. | AWS Marketplace | [One-click deployment and upgrade](docs/deployment/AWS_MARKETPLACE_DEPLOYMENT.md) |
  684. | Installation problems | [Troubleshooting](docs/deployment/INSTALL_TROUBLESHOOTING.md) |
  685. | Documentation maintenance | [Documentation standard](docs/architecture/DOCUMENTATION_MAINTENANCE.md) |
  686. ## Contributing
  687. Read [CONTRIBUTING.md](CONTRIBUTING.md) and [DEVELOPMENT.md](DEVELOPMENT.md)
  688. before opening a pull request. Keep routes thin, preserve API compatibility,
  689. place long-running behavior in the correct process, and include focused tests
  690. for high-risk changes.
  691. The [public roadmap](ROADMAP.md) lists active product themes, planning stages,
  692. and the process for claiming scoped contributor work.
  693. ## License and commercial terms
  694. - Backend source code is licensed under [Apache License 2.0](LICENSE).
  695. - This repository passes automated REUSE checks. Open Byte Inc. has completed
  696. [OpenChain ISO/IEC 5230 and ISO/IEC 18974 online self-certification and maintains conformance evidence](docs/compliance/README.md).
  697. Conformance applies to the defined management-program scope; it is not an
  698. independent third-party certification of the QuantDinger software.
  699. - QuantDinger is a product of **Open Byte Inc**. The name, logo, product
  700. identity, and commercial licensing are managed separately from the code license.
  701. - Web frontend source is published in
  702. [QuantDinger Frontend](https://github.com/OpenByteInc/QuantDinger-Vue) under
  703. its own source-available license.
  704. - Mobile H5 and native client source is published in
  705. [QuantDinger Mobile](https://github.com/OpenByteInc/QuantDinger-Mobile) under
  706. its own source-available license.
  707. - Trademark, branding, attribution, and watermark use is governed by
  708. [TRADEMARKS.md](TRADEMARKS.md). Apache 2.0 does not grant trademark rights.
  709. For commercial licensing, frontend source access, branding authorization, or
  710. deployment support:
  711. - Website: [quantdinger.com](https://www.quantdinger.com)
  712. - Telegram: [t.me/worldinbroker](https://t.me/worldinbroker)
  713. - Email: [support@quantdinger.com](mailto:support@quantdinger.com)
  714. ## Legal notice and compliance
  715. QuantDinger is intended for **lawful research, education, and compliant trading
  716. only**. It must not be used for fraud, market manipulation, sanctions evasion,
  717. money laundering, or other illegal activity. Operators are responsible for
  718. following the laws, licensing requirements, tax rules, broker or exchange terms,
  719. and data regulations that apply in every jurisdiction where they deploy or use
  720. the software.
  721. **This project does not provide legal, tax, investment, financial, or regulatory
  722. advice.** Trading, including automated and leveraged trading, can result in the
  723. loss of some or all capital. Historical data, backtests, simulated results, AI
  724. output, indicators, and strategy examples do not guarantee future performance.
  725. Users must independently review strategies, permissions, order limits, and risk
  726. controls before enabling live execution.
  727. The software is provided under the terms of the applicable license and is used
  728. at the operator's own risk. To the extent permitted by law, project maintainers
  729. and contributors disclaim liability for trading losses, data loss, service
  730. interruption, third-party failures, security incidents, or regulatory consequences
  731. arising from use or misuse of the software.
  732. ## Community and support
  733. <p>
  734. <a href="https://t.me/quantdinger"><img src="docs/badges/telegram-group.svg" alt="Telegram"></a>
  735. <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>
  736. <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>
  737. <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>
  738. </p>
  739. - [Website](https://www.quantdinger.com)
  740. - [Contributing guide](CONTRIBUTING.md)
  741. - [Public roadmap](ROADMAP.md)
  742. - [Contributors](CONTRIBUTORS.md)
  743. - [Report bugs or request features](https://github.com/OpenByteInc/QuantDinger/issues)
  744. - Email: [support@quantdinger.com](mailto:support@quantdinger.com)
  745. ## Sponsors
  746. QuantDinger's continued development and open-source community are supported by:
  747. <table>
  748. <tr>
  749. <td align="center" width="33.33%">
  750. <a href="https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=quantdinger">
  751. <picture>
  752. <source media="(prefers-color-scheme: dark)" srcset="https://www.atlascloud.ai/logo-white.svg">
  753. <img src="https://www.atlascloud.ai/logo.svg" alt="Atlas Cloud" width="176" align="middle">
  754. </picture>
  755. </a>
  756. <br><br>
  757. <strong>Atlas Cloud</strong>
  758. <br>
  759. <sub>AI inference sponsor</sub>
  760. </td>
  761. <td align="center" width="33.33%">
  762. <a href="https://aws.amazon.com/marketplace/pp/prodview-ywy4zb5wnsari">
  763. <picture>
  764. <source media="(prefers-color-scheme: dark)" srcset="https://a0.awsstatic.com/libra-css/images/logos/aws_smile-header-desktop-en-white_59x35.png">
  765. <img src="https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg" alt="Amazon Web Services" width="72" align="middle">
  766. </picture>
  767. </a>
  768. <br><br>
  769. <strong>Amazon Web Services</strong>
  770. <br>
  771. <sub>Cloud infrastructure sponsor</sub>
  772. </td>
  773. <td align="center" width="33.33%">
  774. <a href="https://openai.com/">
  775. <picture>
  776. <source media="(prefers-color-scheme: dark)" srcset="docs/badges/openai-wordmark-white.svg">
  777. <img src="docs/badges/openai-wordmark-black.svg" alt="OpenAI" width="220" align="middle">
  778. </picture>
  779. </a>
  780. <br><br>
  781. <strong>OpenAI</strong>
  782. <br>
  783. <sub>Open-source development tooling sponsor</sub>
  784. </td>
  785. </tr>
  786. </table>
  787. We are grateful to [Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=quantdinger) for supporting AI
  788. model inference, to [Amazon Web Services](https://aws.amazon.com/) for cloud
  789. infrastructure support, and to [OpenAI](https://openai.com/) for open-source
  790. development tooling support that helps QuantDinger serve its community.
  791. <sub>OpenAI and the OpenAI logo are trademarks of OpenAI. Their inclusion acknowledges program and tooling support and does not imply product certification or endorsement.</sub>
  792. ## Acknowledgements
  793. QuantDinger stands on top of a strong open-source ecosystem. Special thanks to
  794. the maintainers and contributors of projects including:
  795. - [Flask](https://flask.palletsprojects.com/)
  796. - [Gunicorn](https://gunicorn.org/)
  797. - [Celery](https://docs.celeryq.dev/)
  798. - [PostgreSQL](https://www.postgresql.org/)
  799. - [Redis](https://redis.io/)
  800. - [Pandas](https://pandas.pydata.org/)
  801. - [NumPy](https://numpy.org/)
  802. - [yfinance](https://github.com/ranaroussi/yfinance)
  803. - [AkShare](https://github.com/akfamily/akshare)
  804. - [Vue.js](https://vuejs.org/)
  805. - [Ant Design Vue](https://antdv.com/)
  806. - [KLineCharts](https://github.com/klinecharts/KLineChart)
  807. - [ECharts](https://echarts.apache.org/)
  808. - [Capacitor](https://capacitorjs.com/)
  809. - [bip-utils](https://github.com/ebellocchia/bip_utils)
  810. - [Prometheus](https://prometheus.io/)
  811. - [Grafana](https://grafana.com/)
  812. ## P.S. — A note on the name
  813. **QuantDinger** is a small tribute to
  814. **[Erwin Schrödinger](https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger)** —
  815. the “-dinger” in our name is the tail of “Schrödinger”. The cat in the box was a
  816. thought experiment; every un-fired strategy is its own little version of it —
  817. simultaneously winning and losing until the order actually fills. Backtests open
  818. the box. Live trading collapses the wavefunction. Trade carefully.
  819. <p align="center"><sub>If QuantDinger is useful to you, a GitHub star helps the project a lot.</sub></p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.