{"id":39267506,"url":"https://github.com/brokermr810/quantdinger","last_synced_at":"2026-05-30T10:00:45.615Z","repository":{"id":330890754,"uuid":"1124295269","full_name":"brokermr810/QuantDinger","owner":"brokermr810","description":"AI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading","archived":false,"fork":false,"pushed_at":"2026-05-28T15:36:33.000Z","size":60723,"stargazers_count":6850,"open_issues_count":2,"forks_count":1484,"subscribers_count":55,"default_branch":"main","last_synced_at":"2026-05-28T17:17:25.304Z","etag":null,"topics":["agent","algotrade","alpaca","backtesting","binance","coinbase","crypto","exchange","finance","fintech","forex","mcp-server","mt5","python","quant","quantitative-finance","saas","stocks","strategy","trade"],"latest_commit_sha":null,"homepage":"https://www.quantdinger.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brokermr810.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"brokermr810","custom":["https://t.me/worldinbroker"]}},"created_at":"2025-12-28T18:39:26.000Z","updated_at":"2026-05-28T16:57:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/brokermr810/QuantDinger","commit_stats":null,"previous_names":["brokermr810/quantdinger"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/brokermr810/QuantDinger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokermr810%2FQuantDinger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokermr810%2FQuantDinger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokermr810%2FQuantDinger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokermr810%2FQuantDinger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brokermr810","download_url":"https://codeload.github.com/brokermr810/QuantDinger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokermr810%2FQuantDinger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33687722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","algotrade","alpaca","backtesting","binance","coinbase","crypto","exchange","finance","fintech","forex","mcp-server","mt5","python","quant","quantitative-finance","saas","stocks","strategy","trade"],"created_at":"2026-01-18T00:39:59.587Z","updated_at":"2026-05-30T10:00:45.608Z","avatar_url":"https://github.com/brokermr810.png","language":"Python","funding_links":["https://github.com/sponsors/brokermr810","https://t.me/worldinbroker"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/brokermr810/QuantDinger\"\u003e\n    \u003cimg src=\"docs/screenshots/logo.jpg\" alt=\"QuantDinger Logo\" width=\"220\" height=\"220\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1\u003eQuantDinger\u003c/h1\u003e\n  \u003ch3\u003eYour Private AI Quant Operating System\u003c/h3\u003e\n  \u003cp\u003e\u003cstrong\u003eOne Docker stack for charting, multi-LLM research, Python strategies, institutional-grade backtests, and multi-venue live execution — fully self-hosted, your keys, your data.\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003e\u003cem\u003eOpen-source quant OS: AI-assisted coding → backtest → paper → live on crypto, IBKR, MT5 \u0026amp; Alpaca — with Agent Gateway, MCP tools, and optional multi-tenant billing.\u003c/em\u003e\u003c/p\u003e\n\n  \u003cdiv align=\"center\" style=\"max-width: 680px; margin: 1.25rem auto 0; padding: 20px 22px 22px; border: 1px solid #d1d9e0; border-radius: 16px;\"\u003e\n    \u003cp style=\"margin: 0 0 14px; line-height: 1.65;\"\u003e\n      \u003ca href=\"README.md\"\u003e\u003cstrong\u003eEnglish\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_CN.md\"\u003e\u003cstrong\u003e简体中文\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_JA.md\"\u003e\u003cstrong\u003e日本語\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_KO.md\"\u003e\u003cstrong\u003e한국어\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_TH.md\"\u003e\u003cstrong\u003eไทย\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_VI.md\"\u003e\u003cstrong\u003eTiếng Việt\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #afb8c1;\"\u003e · \u003c/span\u003e\n      \u003ca href=\"docs/README_AR.md\"\u003e\u003cstrong\u003eالعربية\u003c/strong\u003e\u003c/a\u003e\n    \u003c/p\u003e\n    \u003cp style=\"margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid #eaeef2; line-height: 2;\"\u003e\n      \u003ca href=\"https://ai.quantdinger.com\"\u003e\u003cstrong\u003eSaaS\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #d8dee4;\"\u003e \u0026nbsp;·\u0026nbsp; \u003c/span\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=tNAZ9uMiUUw\"\u003e\u003cstrong\u003eVideo Demo\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #d8dee4;\"\u003e \u0026nbsp;·\u0026nbsp; \u003c/span\u003e\n      \u003ca href=\"https://www.quantdinger.com\"\u003e\u003cstrong\u003eWebsite\u003c/strong\u003e\u003c/a\u003e\n      \u003cspan style=\"color: #d8dee4;\"\u003e \u0026nbsp;·\u0026nbsp; \u003c/span\u003e\n      \u003ca href=\"https://aws.amazon.com/marketplace/pp/prodview-naanrb7d2mbc6\"\u003e\u003cstrong\u003eAWS Marketplace\u003c/strong\u003e\u003c/a\u003e\n    \u003c/p\u003e\n    \u003cp style=\"margin: 0; line-height: 2;\"\u003e\n      \u003ca href=\"https://t.me/quantdinger\"\u003e\u003cimg src=\"https://img.shields.io/badge/Telegram-Join-26A5E4?style=flat-square\u0026logo=telegram\u0026logoColor=white\" alt=\"Telegram\"\u003e\u003c/a\u003e\n      \u0026nbsp;\n      \u003ca href=\"https://discord.com/invite/tyx5B6TChr\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-Server-5865F2?style=flat-square\u0026logo=discord\u0026logoColor=white\" alt=\"Discord\"\u003e\u003c/a\u003e\n      \u0026nbsp;\n      \u003ca href=\"https://youtube.com/@quantdinger\"\u003e\u003cimg src=\"https://img.shields.io/badge/YouTube-%40quantdinger-FF0000?style=flat-square\u0026logo=youtube\u0026logoColor=white\" alt=\"YouTube\"\u003e\u003c/a\u003e\n      \u0026nbsp;\n      \u003ca href=\"https://x.com/QuantDinger_EN\"\u003e\u003cimg src=\"https://img.shields.io/badge/X-%40QuantDinger_EN-000000?style=flat-square\u0026logo=x\u0026logoColor=white\" alt=\"X\"\u003e\u003c/a\u003e\n    \u003c/p\u003e\n  \u003c/div\u003e\n\n  \u003cp style=\"margin-top: 1.45rem; margin-bottom: 10px;\"\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square\u0026logo=apache\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/brokermr810/QuantDinger?style=flat-square\u0026color=orange\u0026label=Version\" alt=\"Version\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.10%2B%20%7C%20Docker%20image%203.12-3776AB?style=flat-square\u0026logo=python\u0026logoColor=white\" alt=\"Python\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Docker-Compose%20Ready-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white\" alt=\"Docker\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Frontend-Prebuilt-1f8b4c?style=flat-square\" alt=\"Frontend\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Agent%20Gateway-MCP%20Ready-6f42c1?style=flat-square\" alt=\"Agent Gateway\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PostgreSQL-16-336791?style=flat-square\u0026logo=postgresql\u0026logoColor=white\" alt=\"PostgreSQL\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/brokermr810/QuantDinger?style=flat-square\u0026logo=github\" alt=\"Stars\"\u003e\n  \u003c/p\u003e\n  \u003cp style=\"margin: 10px 0 12px;\"\u003e\n    \u003ca href=\"https://aws.amazon.com/marketplace/pp/prodview-naanrb7d2mbc6\"\u003e\u003cimg src=\"https://img.shields.io/badge/AWS%20Marketplace-AMI%20%7C%20CentOS%209-232F3E?style=flat-square\u0026logo=amazonaws\u0026logoColor=white\" alt=\"QuantDinger on AWS Marketplace (ThinkCloud AMI)\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp style=\"margin: 12px 0 10px;\"\u003e\n    \u003ca href=\"https://oosmetrics.com/repo/brokermr810/QuantDinger\"\u003e\u003cimg src=\"https://api.oosmetrics.com/api/v1/badge/achievement/4991ab54-52d2-46d4-a03a-67b47b61ae4b.svg\" alt=\"oosmetrics — Top 7 in Training by acceleration (2026-04-25)\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp style=\"margin-top: 14px;\"\u003e\n    \u003ca href=\"https://www.producthunt.com/products/quantdinger/launches/quantdinger?embed=true\u0026amp;utm_source=badge-featured\u0026amp;utm_medium=badge\u0026amp;utm_campaign=badge-quantdinger\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg alt=\"QuantDinger - A local-first, open-source AI quant trading workspace | Product Hunt\" width=\"250\" height=\"54\" src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1057439\u0026amp;theme=light\u0026amp;t=1777556016131\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Contents\n\n[Quick start](#try-in-2-minutes) · [Technical highlights](#technical-highlights) · [Repositories](#related-repositories) · [AI agents \u0026 MCP](#use-it-from-an-ai-agent-cursor--claude-code--codex--mcp) · [Overview](#product-overview) · [Features](#features-at-a-glance) · [Visual tour](#visual-tour) · [Architecture](#architecture) · [Install](#installation--first-time-setup-docker-compose) · [Docs](#documentation) · [FAQ](#faq) · [License](#license-and-commercial-terms)\n\n---\n\n\u003e QuantDinger is a **self-hosted, local-first** quantitative OS — not a chatbot with a buy button. It unifies **multi-LLM research**, **Python-native strategy engines**, **server-side backtesting**, and **multi-broker live execution** (10+ crypto venues, IBKR, MT5, Alpaca) in one production-grade stack you fully control.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/ezgif.com-animated-gif-maker.gif\" alt=\"QuantDinger quick demo: install, sign in, charting, AI analysis, and strategy workflow\" width=\"920\" style=\"border-radius: 12px; border: 1px solid #eaeef2;\"\u003e\n  \u003cp\u003e\u003csub\u003e\u003cem\u003eFrom zero to running stack — charting, AI research, and strategy workflow in minutes.\u003c/em\u003e\u003c/sub\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/architecture.png\" alt=\"QuantDinger system architecture: Data Sources → Indicator / Signal / Strategy / Backtesting / AI Analysis layers → Execution, with the closed-loop quant workflow (Idea → Indicator → Strategy → Backtest → Optimize → Execute → Monitor)\" width=\"960\"\u003e\n  \u003cp\u003e\u003csub\u003e\u003cem\u003eFive-layer quant engine on a closed loop: \u003cstrong\u003eIdea → Indicator → Strategy → Backtest → Optimize → Execute → Monitor\u003c/strong\u003e — market data in, audited orders out.\u003c/em\u003e\u003c/sub\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n## Technical highlights\n\n| | What makes QuantDinger different |\n|---|----------------------------------|\n| **Full-stack quant OS** | Charting, indicator IDE, AI research, backtests, live bots, quick trade, and broker account management — one product, one Postgres state store. |\n| **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. |\n| **Dual strategy runtimes** | **`IndicatorStrategy`** (vectorized dataframe signals + chart overlays) and **`ScriptStrategy`** (event-driven `on_bar`, explicit orders) — research and production in the same codebase. |\n| **Multi-venue execution** | CCXT crypto (Binance, OKX, Bybit, …), **IBKR** stocks, **MT5** forex, **Alpaca** US equities/ETFs/crypto — unified Broker Accounts page with isolated multi-tenant sessions. |\n| **Production-grade infra** | **PostgreSQL 16** + **Redis 7**, connection pooling, background workers (orders, portfolio monitor, reflection), idempotent schema bootstrap, GHCR multi-arch images (amd64/arm64). |\n| **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. |\n| **Operator-ready** | OAuth, multi-user roles, credits/membership/USDT billing toggles, AWS Marketplace AMI, 7-language docs — build a commercial quant product on top, not just a hobby bot. |\n\n## Try in 2 minutes\n\n\u003e **Fastest path: one command.** No `git clone`, no `npm`, no Vue source tree. Prebuilt images from GHCR; `SECRET_KEY` auto-generated on first backend start.\n\n**Prerequisites:** [Docker](https://docs.docker.com/get-docker/) with Compose v2 (Docker Desktop on Windows/macOS). **Node.js is not required.**\n\n### One-line install (Linux / macOS)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/brokermr810/QuantDinger/main/install.sh | bash\n```\n\nInstalls to `~/quantdinger` by default (override: `… | bash -s -- /opt/quantdinger`). Re-run the same command to pull latest images and restart.\n\nThen open **`http://localhost:8888`**, sign in with **`quantdinger` / `123456`**, and **change the default admin password**.\n\n### Lightest: two files only (no `git clone`)\n\nIf you only need a running stack and can reach GHCR + Docker Hub (or a mirror):\n\n```bash\ncurl -O https://raw.githubusercontent.com/brokermr810/QuantDinger/main/docker-compose.ghcr.yml\ncurl -o backend.env https://raw.githubusercontent.com/brokermr810/QuantDinger/main/backend_api_python/env.example\ndocker compose -f docker-compose.ghcr.yml pull\ndocker compose -f docker-compose.ghcr.yml up -d\n```\n\n`SECRET_KEY` is auto-generated on first backend start. Open **`http://localhost:8888`**.\n\n### Standard: clone this repo (recommended for config \u0026 docs)\n\n**macOS / Linux (Bash) — one line**\n\n```bash\ngit clone https://github.com/brokermr810/QuantDinger.git \u0026\u0026 cd QuantDinger \u0026\u0026 cp backend_api_python/env.example backend_api_python/.env \u0026\u0026 chmod +x scripts/generate-secret-key.sh \u0026\u0026 ./scripts/generate-secret-key.sh \u0026\u0026 docker compose pull \u0026\u0026 docker compose up -d\n```\n\n**Windows (PowerShell)** — folder name after clone is **`QuantDinger`** (same spelling as the GitHub repo; `cd quantdinger` also works on Windows when case-insensitive):\n\n```powershell\ngit clone https://github.com/brokermr810/QuantDinger.git\nSet-Location QuantDinger\nCopy-Item backend_api_python\\env.example -Destination backend_api_python\\.env\n$key = \u0026 python -c \"import secrets; print(secrets.token_hex(32))\" 2\u003e$null\nif (-not $key) { $key = \u0026 py -c \"import secrets; print(secrets.token_hex(32))\" 2\u003e$null }\nif (-not $key) { $key = \u0026 python3 -c \"import secrets; print(secrets.token_hex(32))\" 2\u003e$null }\nif (-not $key) { Write-Error \"Install Python 3 from python.org (tick 'Add to PATH') or use Git Bash with the Bash one-liner above.\" }\n(Get-Content backend_api_python\\.env) -replace '^SECRET_KEY=.*$', \"SECRET_KEY=$key\" | Set-Content backend_api_python\\.env -Encoding utf8\ndocker compose pull\ndocker compose up -d\n```\n\nUse **`docker compose`** (space). Legacy **`docker-compose`** (hyphen) works on many installs. **Git Bash** can run the Bash one-liner as-is.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDo not use \u003ccode\u003edocker compose up --build\u003c/code\u003e for a normal install\u003c/b\u003e\u003c/summary\u003e\n\nA plain `docker compose up --build` does **not** rebuild the frontend — the main `docker-compose.yml` only declares `image:` for the frontend service, so `--build` only affects the backend. To rebuild the frontend from local Vue source you must opt in via the `docker-compose.build.yml` override (see below).\n\n| Goal | Command |\n|------|---------|\n| First-time / routine start | `docker compose pull` then `docker compose up -d` |\n| Rebuild **backend** only after code changes | `docker compose up -d --build backend` |\n| Hack on Vue UI from source | Clone [QuantDinger-Vue](https://github.com/brokermr810/QuantDinger-Vue) into `./QuantDinger-Vue/`, then `docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build` |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSlow or failed \u003ccode\u003edocker pull\u003c/code\u003e (China / VPN)\u003c/b\u003e\u003c/summary\u003e\n\nSystem VPN often **does not** proxy Docker Desktop. Either configure **Docker Desktop → Settings → Proxies** (e.g. `http://127.0.0.1:7890` for Clash), or add to a **repository-root** `.env`:\n\n```ini\nIMAGE_PREFIX=docker.m.daocloud.io/library/\n```\n\nThen run `docker compose pull` again. Errors like `content size of zero` or `connectex` on `registry-1.docker.io` are registry/network issues, not application bugs.\n\n\u003c/details\u003e\n\n---\n\nThen open **`http://localhost:8888`**, sign in with **`quantdinger` / `123456`**, and **change the default admin password** before any real use.\n\nFor step-by-step detail and troubleshooting, see **[Installation \u0026 first-time setup](#installation--first-time-setup-docker-compose)**.\n\n## Related repositories\n\nThis repo ships the **backend**, **Docker Compose** stack, and **documentation**. The web UI image is published independently to GHCR by the sibling Vue repo. Use the sibling repos when you need source-level UI changes or the mobile app:\n\n| Repository | What it is |\n|------------|------------|\n| **[QuantDinger](https://github.com/brokermr810/QuantDinger)** (this repo) | Backend (Flask/Python), Compose stack, docs |\n| **[QuantDinger-Vue](https://github.com/brokermr810/QuantDinger-Vue)** | **Web frontend source** (Vue) — tagging `v*` publishes `ghcr.io/brokermr810/quantdinger-frontend` automatically |\n| **[QuantDinger-Mobile](https://github.com/brokermr810/QuantDinger-Mobile)** | **Open-source mobile client** — pairs with your self-hosted or SaaS backend |\n\n**Note:** Node.js is only required if you build the web UI from **QuantDinger-Vue**; the default Docker quick start pulls the published image and does not need it.\n\n## Use it from an AI agent (Cursor / Claude Code / Codex / MCP)\n\nQuantDinger ships an **Agent Gateway** at `/api/agent/v1` plus a small **MCP server** ([`quantdinger-mcp`](https://pypi.org/project/quantdinger-mcp/) on PyPI) that wraps it as Model Context Protocol tools. Issue a token once and your AI client can read markets, manage strategies, run backtests, and (paper-only by default) place trades — without ever seeing your exchange keys or your admin JWT.\n\n\u003e Every agent call is **audit-logged**, and trading-class tokens are **paper-only by default**. Live execution requires both `paper_only=false` on the token AND `AGENT_LIVE_TRADING_ENABLED=true` on the server.\n\n**Two backends, same client config — only `QUANTDINGER_BASE_URL` differs:**\n\n- **Hosted (30 s try-out)** — sign up at [ai.quantdinger.com](https://ai.quantdinger.com) → **Sidebar → Agent Tokens** → Issue Token. Locked to `paper_only=true`, no real-money orders.\n- **Self-hosted (this repo)** — after the [Try in 2 minutes](#try-in-2-minutes) Docker bring-up, open `http://localhost:8888/#/agent-tokens`. You control scopes, allowlists, rate limits, and live-trading flag.\n\nThen point Cursor / Claude Code / Codex at the MCP server (`.cursor/mcp.json` template: [`docs/agent/cursor-mcp.example.json`](docs/agent/cursor-mcp.example.json)):\n\n```json\n{ \"mcpServers\": { \"quantdinger\": {\n  \"command\": \"uvx\", \"args\": [\"quantdinger-mcp\"],\n  \"env\": { \"QUANTDINGER_BASE_URL\": \"http://localhost:8888\",\n           \"QUANTDINGER_AGENT_TOKEN\": \"qd_agent_xxxxxxxx\" }\n} } }\n```\n\n**Full setup recipe** — local stdio config, remote HTTP transport, Claude Code CLI helper, example agent prompts, audit-log walkthrough: **[`docs/agent/MCP_SETUP.md`](docs/agent/MCP_SETUP.md)**.\n\nDeeper references: [AI Integration design](docs/agent/AI_INTEGRATION_DESIGN.md) · [Quickstart with `curl`](docs/agent/AGENT_QUICKSTART.md) · [OpenAPI 3.0 spec](docs/agent/agent-openapi.json) · [MCP server README](mcp_server/README.md)\n\n## Product overview\n\nQuantDinger is a **self-hosted quantitative operating system** — not a single-purpose trading bot. It replaces the typical patchwork of TradingView + Jupyter + ChatGPT + exchange scripts with **one audited, Docker-native stack**: multi-LLM research, Python strategy IDEs, server-side backtests, and live execution across crypto, equities, forex, and ETFs — with optional multi-user billing for operators who resell access.\n\n| Typical DIY stack | QuantDinger |\n|-------------------|-------------|\n| Chat AI disconnected from execution | Research, NL→code, backtests, and orders in one product with shared Postgres state |\n| 5–10 tools wired by hand | Nginx + Vue UI, Flask API, Redis-backed workers, env-driven exchange/LLM adapters |\n| Opaque SaaS holds your keys | Your infra, your exchange keys, your LLM keys — Apache 2.0 backend |\n| Script bots with no audit trail | Agent Gateway with scope limits, rate limits, and append-only audit log |\n| Research code ≠ live code | `IndicatorStrategy` and `ScriptStrategy` share the same runtime and data layer |\n\n**Audience:** independent quants, Python strategy authors, prop/small teams, and operators building white-label quant products on private infrastructure.\n\n## Visual Tour\n\n\u003ctable align=\"center\" width=\"100%\"\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\" align=\"center\"\u003e\n      \u003ca href=\"https://www.youtube.com/watch?v=wHIvvv6fmHA\"\u003e\n        \u003cimg src=\"docs/screenshots/video_demo.png\" alt=\"Video Demo\" width=\"80%\" style=\"border-radius: 12px;\"\u003e\n      \u003c/a\u003e\n      \u003cbr/\u003e\n      \u003csub\u003e\n        \u003ca href=\"https://www.youtube.com/watch?v=wHIvvv6fmHA\"\u003e\n          \u003cstrong\u003e▶ Watch Product Demo on YouTube\u003c/strong\u003e\n        \u003c/a\u003e\n      \u003c/sub\u003e\n      \u003cbr/\u003e\n      \u003csub\u003eClick the preview card above to open the full video walkthrough.\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\u003cimg src=\"docs/screenshots/v31.png\" alt=\"Indicator IDE\" style=\"border-radius: 6px;\"\u003e\u003cbr/\u003e\u003csub\u003eIndicator IDE, charting, backtest, and quick trade\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\u003cimg src=\"docs/screenshots/v32.png\" alt=\"AI Asset Analysis\" style=\"border-radius: 6px;\"\u003e\u003cbr/\u003e\u003csub\u003eAI asset analysis and opportunity radar\u003c/sub\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"docs/screenshots/v33.png\" alt=\"Trading Bots\" style=\"border-radius: 6px;\"\u003e\u003cbr/\u003e\u003csub\u003eTrading bot workspace and automation templates\u003c/sub\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"docs/screenshots/v34.png\" alt=\"Strategy Live\" style=\"border-radius: 6px;\"\u003e\u003cbr/\u003e\u003csub\u003eStrategy live operations, performance, and monitoring\u003c/sub\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Features at a glance\n\n- **Research \u0026 AI** — Multi-LLM ensemble analysis, watchlists, opportunity radar, NL→indicator/strategy, post-backtest AI hints; optional confidence calibration. **[Agent Gateway + MCP](#use-it-from-an-ai-agent-cursor--claude-code--codex--mcp)** for Cursor / Claude Code / Codex with scoped tokens and SSE job streaming.\n- **Build** — Professional KLine chart UI; `IndicatorStrategy` (dataframe `buy`/`sell` signals) and `ScriptStrategy` (`on_bar`, `ctx.buy()` / `ctx.sell()`); AI code generation as a starting point, Python as source of truth.\n- **Validate** — Server-side backtests with equity curves, drawdown metrics, trade logs, and strategy snapshots — no client-side-only backtest theater.\n- **Operate** — Live strategy bots, quick trade, **10+ crypto exchanges** via CCXT, **IBKR** / **MT5** / **Alpaca** (US stocks, ETFs, crypto); unified **Broker Accounts** page; notifications (Telegram, email, SMS, Discord, webhooks).\n- **Platform** — Docker Compose + GHCR images, PostgreSQL 16, Redis 7, OAuth, multi-user RBAC, credits / membership / USDT billing toggles, AWS Marketplace AMI, 7-language documentation.\n\n## Architecture\n\n**Design principle:** separate **market data ingestion**, **strategy/backtest compute**, and **order execution** so research never shares a code path with live capital unless you explicitly promote a strategy.\n\n**Stack:** Nginx serves the prebuilt Vue SPA (`ghcr.io/brokermr810/quantdinger-frontend`); **Flask + Gunicorn** API hosts strategy, AI, billing, and agent services; **PostgreSQL 16** is the system of record; **Redis 7** backs cache and worker coordination. Exchanges, brokers, LLMs, and payment rails plug in through env-driven adapters — swap providers without forking core code.\n\n**Runtime flow:** market feeds → indicator/signal layer → strategy engine → backtest or live runtime → venue-specific execution adapters; pending orders dispatched by background workers with health checks and retry semantics.\n\n**Deploy surfaces:** one-line `install.sh`, zero-repo GHCR Compose, full-repo Compose (local backend build), AWS Marketplace AMI, and SaaS at [ai.quantdinger.com](https://ai.quantdinger.com) for trials.\n\n### System diagram\n\n```mermaid\nflowchart LR\n    U[Trader / Operator / Researcher]\n\n    subgraph FE[Frontend Layer]\n        WEB[Vue Web App]\n        NG[Nginx Delivery]\n    end\n\n    subgraph BE[Application Layer]\n        API[Flask API Gateway]\n        AI[AI Analysis Services]\n        STRAT[Strategy and Backtest Engine]\n        EXEC[Execution and Quick Trade]\n        BILL[Billing and Membership]\n    end\n\n    subgraph DATA[State Layer]\n        PG[(PostgreSQL 16)]\n        REDIS[(Redis 7)]\n        FILES[Logs and Runtime Data]\n    end\n\n    subgraph EXT[External Integrations]\n        LLM[LLM Providers]\n        EXCH[Crypto Exchanges]\n        BROKER[IBKR / MT5 / Alpaca]\n        MARKET[Market Data / News]\n        PAY[TronGrid / USDT Payment]\n        NOTIFY[Telegram / Email / SMS / Webhook]\n    end\n\n    U --\u003e WEB\n    WEB --\u003e NG --\u003e API\n    API --\u003e AI\n    API --\u003e STRAT\n    API --\u003e EXEC\n    API --\u003e BILL\n\n    AI --\u003e PG\n    STRAT --\u003e PG\n    EXEC --\u003e PG\n    BILL --\u003e PG\n    API --\u003e REDIS\n    API --\u003e FILES\n\n    AI --\u003e LLM\n    AI --\u003e MARKET\n    EXEC --\u003e EXCH\n    EXEC --\u003e BROKER\n    BILL --\u003e PAY\n    API --\u003e NOTIFY\n```\n\n## Installation \u0026 first-time setup (Docker Compose)\n\n\u003e **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.\n\nThis 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.\n\n### Prerequisites\n\n| Item | Notes |\n|------|--------|\n| [Docker](https://docs.docker.com/get-docker/) + Docker Compose v2 | Used for Postgres, Redis, API, and static UI. |\n| `git` | To clone this repository. |\n| Ports (defaults) | `8888` (web), `5000` (API, bound to **127.0.0.1**), `5432` / `6379` (DB/Redis, loopback by default). Change via root `.env` if they collide. |\n| Disk | Postgres volume grows with users, strategies, and logs; plan a few GB minimum for serious use. |\n\n### 1) Clone the repository\n\n```bash\ngit clone https://github.com/brokermr810/QuantDinger.git\ncd QuantDinger\n```\n\n### 2) Create backend configuration (mandatory)\n\n```bash\ncp backend_api_python/env.example backend_api_python/.env\n```\n\nAlmost all runtime behavior is driven by **`backend_api_python/.env`** (database URL, admin user, LLM keys, workers, billing toggles, etc.). The optional **repository root** `.env` only adjusts Compose-level concerns such as **ports** and **image mirrors** (`IMAGE_PREFIX`).\n\n### 3) Set `SECRET_KEY` before the first boot (mandatory)\n\nThe API **refuses to start** if `SECRET_KEY` is still the placeholder from `env.example`. This blocks accidental insecure deployments.\n\n**Linux / macOS** (recommended):\n\n```bash\n./scripts/generate-secret-key.sh\n```\n\nThe script overwrites the `SECRET_KEY=` line in `backend_api_python/.env` using Python’s `secrets` module.\n\n**Manual** (any OS): generate a long random string (for example 64 hex chars) and set `SECRET_KEY=...` in `backend_api_python/.env`.\n\n### 4) Start the stack\n\n```bash\ndocker compose pull\ndocker compose up -d\n```\n\n- **`frontend`** — pulls `ghcr.io/brokermr810/quantdinger-frontend:latest` (no local Vue tree required).\n- **`backend`** — built from `./backend_api_python` on first start if no local image exists yet.\n- 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).\n\nServices: **`postgres`**, **`redis`**, **`backend`**, **`frontend`** (see `docker-compose.yml`).\n\n#### Alternative: zero-repo install from GHCR (lightest)\n\nPrebuilt multi-arch (amd64/arm64) images for **both** backend and frontend — no `git clone`:\n\n```bash\ncurl -O https://raw.githubusercontent.com/brokermr810/QuantDinger/main/docker-compose.ghcr.yml\ncurl -o backend.env https://raw.githubusercontent.com/brokermr810/QuantDinger/main/backend_api_python/env.example\ndocker compose -f docker-compose.ghcr.yml pull\ndocker compose -f docker-compose.ghcr.yml up -d\n```\n\nThe backend entrypoint auto-generates a random `SECRET_KEY` on first start and applies the schema (`migrations/init.sql`) idempotently. Edit `backend.env` for persistent overrides (API keys, OAuth, broker credentials). Compose orchestration knobs go in a separate `.env` (optional) — e.g. pin a version:\n\n```env\n# Common case: lockstep both sides to one tag\nIMAGE_TAG=3.0.10\n\n# Advanced (opt-in): decouple sides. Either var alone overrides only\n# that side; the other still follows IMAGE_TAG.\n# BACKEND_TAG=v3.0.9\n# FRONTEND_TAG=v3.1.0-rc1\n\n# BACKEND_IMAGE=ghcr.io/\u003cyour-fork\u003e/quantdinger-backend     # optional, for forks\n# FRONTEND_IMAGE=ghcr.io/\u003cyour-fork\u003e/quantdinger-frontend\n```\n\nTag resolution: `BACKEND_TAG` / `FRONTEND_TAG` → `IMAGE_TAG` → compose default (`latest`). Without a root `.env`, both compose files pull `ghcr.io/brokermr810/quantdinger-{backend,frontend}:latest`. Pin a specific release by setting `IMAGE_TAG` (lockstep) or `BACKEND_TAG` / `FRONTEND_TAG` (per-side) — see [GitHub Releases](https://github.com/brokermr810/QuantDinger/releases) for available tags.\n\n#### Alternative: build the frontend from Vue source\n\nIf you have access to the **QuantDinger-Vue** repo and want to iterate on UI source (theme tweaks, forks, debugging) instead of pulling the published image, clone it into the `./QuantDinger-Vue/` slot at the repo root (gitignored) and let Compose build from there:\n\n```bash\ngit clone https://github.com/brokermr810/QuantDinger-Vue.git QuantDinger-Vue\ndocker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build\n```\n\nThe main `docker-compose.yml` only pulls the GHCR image; the override file `docker-compose.build.yml` adds the local `build:` block. Without the override, `./QuantDinger-Vue/` does not need to exist. Point `FRONTEND_SRC_PATH=/abs/path/to/QuantDinger-Vue` if you'd rather keep the source somewhere else, or set `COMPOSE_FILE=docker-compose.yml:docker-compose.build.yml` in a root `.env` to skip the long `-f -f` invocation. The locally built image is tagged the same way as the published one (`FRONTEND_TAG` / `IMAGE_TAG` rules apply), so it slots into the rest of the stack with no further changes.\n\n### 5) Verify and sign in\n\n| Check | URL / command |\n|--------|----------------|\n| Web UI | `http://localhost:8888` (override host/port with `FRONTEND_HOST` / `FRONTEND_PORT` in root `.env` if needed). |\n| API health | `http://localhost:5000/api/health` |\n| Logs | `docker-compose logs -f backend` |\n\nDefault admin (change immediately in production):\n\n- **User**: `quantdinger`\n- **Password**: `123456` (from `env.example`; override with `ADMIN_USER` / `ADMIN_PASSWORD` in `.env` before first use if you prefer).\n\nAlso 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.\n\n### 6) Optional: enable AI features\n\nAI analysis, NL→code, and related flows need at least one LLM provider configured. Open `backend_api_python/env.example`, find the **AI / LLM** block, copy the relevant keys into your `.env` (for example `LLM_PROVIDER` + `OPENROUTER_API_KEY`, or another supported provider). Restart the backend after edits.\n\n### 7) Windows notes\n\nUse **Docker Desktop** (WSL2 backend recommended). From PowerShell in the repo root:\n\n```powershell\ngit clone https://github.com/brokermr810/QuantDinger.git\nSet-Location QuantDinger\nCopy-Item backend_api_python\\env.example -Destination backend_api_python\\.env\n$key = py -c \"import secrets; print(secrets.token_hex(32))\"\n(Get-Content backend_api_python\\.env) -replace '^SECRET_KEY=.*$', \"SECRET_KEY=$key\" | Set-Content backend_api_python\\.env -Encoding UTF8\ndocker compose pull\ndocker compose up -d\n```\n\nIf `py` is not on PATH, use `python` or `python3` in the one-liner that generates `$key`. Line endings should remain UTF-8; avoid editors that strip newlines from `.env`.\n\n### Troubleshooting (first boot)\n\n| Symptom | What to check |\n|---------|----------------|\n| `QuantDinger-Vue` not found | You added `-f docker-compose.build.yml` without cloning Vue source. Drop the override (plain `docker compose up -d`) or clone into `./QuantDinger-Vue/` first. |\n| `redis` / `python` / `node` pull fails, `content size of zero` | Docker Hub unreachable from Docker Desktop. Set root `.env` `IMAGE_PREFIX=docker.m.daocloud.io/library/` and/or configure **Docker Desktop → Proxies** (system VPN alone is often not enough). |\n| Backend exits immediately | `SECRET_KEY` still default, or invalid `.env` syntax. Read `docker compose logs backend`. |\n| Blank page or API errors from browser | `FRONTEND_URL` / origins mismatch; API not reachable from the host you opened. |\n| Port already in use | Another Postgres, Redis, or local service on `5432` / `6379` / `5000` / `8888`. Adjust variables in root `.env` per `docker-compose.yml`. |\n| Many live strategies, “start denied” | Raise `STRATEGY_MAX_THREADS` in `backend_api_python/.env` and restart API (see comments in `env.example`). |\n\n### Common Docker commands\n\n```bash\ndocker compose ps\ndocker compose logs -f backend\ndocker compose restart backend\ndocker compose pull\ndocker compose up -d\ndocker compose up -d --build backend   # backend code changes only\ndocker compose down\n```\n\n### Optional root `.env` (Compose only)\n\nFor **custom ports** or **mirror/prefix** for base images (slow Docker Hub pulls), create a file named `.env` in the **repository root** (same directory as `docker-compose.yml`):\n\n```ini\nFRONTEND_PORT=3000\nBACKEND_PORT=127.0.0.1:5001\nIMAGE_PREFIX=docker.m.daocloud.io/library/\n```\n\nProduction-style TLS, domain, and reverse-proxy placement are covered in **[Cloud deployment](docs/CLOUD_DEPLOYMENT_EN.md)**.\n\n### Suggested first session (product walkthrough)\n\nAfter the stack is healthy: (1) run an **AI asset / market analysis** so LLM and data paths are verified; (2) open the **Indicator IDE**, load a symbol, and run a **signal backtest** on a small date range; (3) optionally use **AI code generation** to draft an indicator, then edit the Python; (4) when ready, attach **exchange API keys** (profile / credentials), use **test connection**, then explore **live strategy** or **quick trade** with execution mode you intend. This order surfaces configuration issues early before real capital.\n\n## Minimal Example: Python Indicator Strategy\n\nThis is the kind of Python-native strategy logic QuantDinger is designed for:\n\n```python\n# @param sma_short int 14 Short moving average\n# @param sma_long int 28 Long moving average\n\nsma_short_period = params.get('sma_short', 14)\nsma_long_period = params.get('sma_long', 28)\n\nmy_indicator_name = \"Dual Moving Average Strategy\"\nmy_indicator_description = f\"SMA {sma_short_period}/{sma_long_period} crossover\"\n\ndf = df.copy()\nsma_short = df[\"close\"].rolling(sma_short_period).mean()\nsma_long = df[\"close\"].rolling(sma_long_period).mean()\n\nbuy = (sma_short \u003e sma_long) \u0026 (sma_short.shift(1) \u003c= sma_long.shift(1))\nsell = (sma_short \u003c sma_long) \u0026 (sma_short.shift(1) \u003e= sma_long.shift(1))\n\ndf[\"buy\"] = buy.fillna(False).astype(bool)\ndf[\"sell\"] = sell.fillna(False).astype(bool)\n```\n\nSee full examples:\n\n- [`docs/examples/dual_ma_with_params.py`](docs/examples/dual_ma_with_params.py)\n- [`docs/examples/multi_indicator_composite.py`](docs/examples/multi_indicator_composite.py)\n- [`docs/examples/cross_sectional_momentum_rsi.py`](docs/examples/cross_sectional_momentum_rsi.py)\n\n## Supported Markets, Brokers, and Exchanges\n\n### Crypto Exchanges\n\n| Venue | Coverage |\n|-------|----------|\n| Binance | Spot, Futures, Margin |\n| OKX | Spot, Perpetual, Options |\n| Bitget | Spot, Futures, Copy Trading |\n| Bybit | Spot, Linear Futures |\n| Coinbase | Spot |\n| Kraken | Spot, Futures |\n| KuCoin | Spot, Futures |\n| Gate.io | Spot, Futures |\n| Deepcoin | Derivatives integration |\n| HTX | Spot, USDT-margined perpetuals |\n\n### Traditional Markets\n\n| Market | Broker / Source | Execution |\n|--------|------------------|-----------|\n| US Stocks | IBKR, Alpaca, Yahoo Finance, Finnhub | Via IBKR or Alpaca (paper + live) |\n| ETFs | Alpaca | Via Alpaca (paper + live) |\n| Forex | MT5, OANDA | Via MT5 |\n| Futures | Exchange and data integrations | Data and workflow support |\n\n\u003e **Broker Accounts page (`/broker-accounts`, v3.0.5+)** — IBKR, MT5 and Alpaca share a single unified management page: per-broker connect form, account KPIs, positions table and open-order management with one-click cancel. Multi-tenant safe: each user's session is isolated via `BrokerSessionRegistry`, so one user reconnecting doesn't kick everyone else off.\n\n## Strategy Development Modes\n\nQuantDinger supports two main strategy authoring models:\n\n### IndicatorStrategy\n\n- dataframe-based Python scripts\n- `buy` / `sell` signal generation\n- chart rendering and signal-style backtests\n- best for research, indicator logic, and visual strategy prototyping\n\n### ScriptStrategy\n\n- event-driven `on_init(ctx)` / `on_bar(ctx, bar)` scripts\n- explicit runtime control with `ctx.buy()`, `ctx.sell()`, `ctx.close_position()`\n- best for stateful strategies, execution-oriented logic, and live alignment\n\nFor the full developer workflow, see:\n\n- [Strategy Development Guide](docs/STRATEGY_DEV_GUIDE.md)\n- [Cross-Sectional Strategy Guide](docs/CROSS_SECTIONAL_STRATEGY_GUIDE_EN.md)\n- [Strategy Examples](docs/examples/)\n\nThe example scripts live in `docs/examples/` and are kept aligned with the current strategy development guides.\n\n## Repository Layout\n\n```text\nQuantDinger/\n├── backend_api_python/      # Open backend source code\n│   ├── app/routes/          # REST endpoints\n│   ├── app/services/        # AI, trading, billing, backtest, integrations\n│   ├── migrations/init.sql  # Database initialization\n│   ├── env.example          # Main environment template\n│   └── Dockerfile\n├── docs/                    # Product, strategy, and deployment documentation\n├── install.sh               # One-line GHCR install (curl | bash)\n├── docker-compose.yml       # Web UI via GHCR; optional ./QuantDinger-Vue/ for local UI builds\n├── docker-compose.ghcr.yml  # Zero-repo deploy — both images from GHCR\n├── LICENSE\n└── TRADEMARKS.md\n```\n\n## Configuration Areas\n\nUse `backend_api_python/env.example` as the primary template. Key areas include:\n\n| Area | Examples |\n|------|----------|\n| Authentication | `SECRET_KEY`, `ADMIN_USER`, `ADMIN_PASSWORD` |\n| Database | `DATABASE_URL` |\n| LLM / AI | `LLM_PROVIDER`, `OPENROUTER_API_KEY`, `OPENAI_API_KEY` |\n| OAuth | `GOOGLE_CLIENT_ID`, `GITHUB_CLIENT_ID` |\n| Security | `TURNSTILE_SITE_KEY`, `ENABLE_REGISTRATION` |\n| Billing | `BILLING_ENABLED`, `BILLING_COST_AI_ANALYSIS` |\n| Membership | `MEMBERSHIP_MONTHLY_PRICE_USD`, `MEMBERSHIP_MONTHLY_CREDITS` |\n| USDT Payment | `USDT_PAY_ENABLED`, `USDT_TRC20_XPUB`, `TRONGRID_API_KEY` |\n| Optional data APIs | `TWELVE_DATA_API_KEY`, `FINNHUB_API_KEY`, `TIINGO_API_KEY`, `ADANOS_API_KEY` |\n| Proxy | `PROXY_URL` |\n| Workers | `ENABLE_PENDING_ORDER_WORKER`, `ENABLE_PORTFOLIO_MONITOR`, `ENABLE_REFLECTION_WORKER` |\n| AI tuning | `ENABLE_AI_ENSEMBLE`, `ENABLE_CONFIDENCE_CALIBRATION`, `AI_ENSEMBLE_MODELS` |\n\n## Documentation\n\n| Doc | Notes |\n|-----|--------|\n| [Changelog](docs/CHANGELOG.md) | Releases \u0026 migrations |\n| [README (中文)](docs/README_CN.md) | Chinese overview |\n| [JA](docs/README_JA.md) · [KO](docs/README_KO.md) · [TH](docs/README_TH.md) · [VI](docs/README_VI.md) · [AR](docs/README_AR.md) | Concise localized READMEs (Japanese, Korean, Thai, Vietnamese, Arabic) |\n| [Cloud deployment](docs/CLOUD_DEPLOYMENT_EN.md) | HTTPS, reverse proxy, production |\n| [Multi-user](docs/multi-user-setup.md) | Postgres multi-tenant patterns |\n| [Agent environment](docs/agent/AGENT_ENVIRONMENT_DESIGN.md) · [AI integration](docs/agent/AI_INTEGRATION_DESIGN.md) · [Quickstart](docs/agent/AGENT_QUICKSTART.md) · [OpenAPI](docs/agent/agent-openapi.json) · [MCP server](mcp_server/README.md) | Coding agents \u0026 MCP (`quantdinger-mcp` on PyPI) |\n\n**Strategy:** [EN](docs/STRATEGY_DEV_GUIDE.md) · [CN](docs/STRATEGY_DEV_GUIDE_CN.md) · [TW](docs/STRATEGY_DEV_GUIDE_TW.md) · [JA](docs/STRATEGY_DEV_GUIDE_JA.md) · [KO](docs/STRATEGY_DEV_GUIDE_KO.md) · [Cross-sectional EN](docs/CROSS_SECTIONAL_STRATEGY_GUIDE_EN.md) / [CN](docs/CROSS_SECTIONAL_STRATEGY_GUIDE_CN.md) · [Examples](docs/examples/)\n\n**Integrations \u0026 alerts:** [IBKR](docs/IBKR_TRADING_GUIDE_EN.md) · [MT5 EN](docs/MT5_TRADING_GUIDE_EN.md) / [CN](docs/MT5_TRADING_GUIDE_CN.md) · [OAuth EN](docs/OAUTH_CONFIG_EN.md) / [CN](docs/OAUTH_CONFIG_CN.md) · Telegram / Email / SMS configs under [`docs/`](docs/) (`NOTIFICATION_*`).\n\n## FAQ\n\n### Is QuantDinger really self-hosted?\n\nYes. The default deployment model is your own Docker Compose stack with your own database, Redis instance, credentials, and environment configuration.\n\n### Is QuantDinger only for crypto trading?\n\nNo. Crypto is a major focus, but the platform also includes IBKR and Alpaca workflows for US stocks / ETFs (Alpaca additionally covers crypto) and MT5 workflows for forex.\n\n### Can I write strategies directly in Python?\n\nYes. QuantDinger supports both dataframe-style `IndicatorStrategy` development and event-driven `ScriptStrategy` development. You can also use AI to generate a starting point and then edit it yourself.\n\n### Is this a research tool or a live trading platform?\n\nIt is both. QuantDinger is built to connect AI research, charting, strategy development, backtesting, quick trade flows, and live execution operations in one system.\n\n### Can I use QuantDinger commercially?\n\nThe backend is licensed under Apache 2.0. The **web** frontend source ([QuantDinger-Vue](https://github.com/brokermr810/QuantDinger-Vue)) uses a separate source-available license—review both and contact the project for commercial frontend authorization if needed. The **[mobile app repo](https://github.com/brokermr810/QuantDinger-Mobile)** is open source under its own license (see that repository).\n\n### Is there a mobile app?\n\nYes—see **[QuantDinger-Mobile](https://github.com/brokermr810/QuantDinger-Mobile)** (open source). It connects to the same backend you self-host or to SaaS.\n\n## Exchange Partner Links\n\nThe following links are available in-app under **Profile → Open account** or **Broker Accounts → Open account**, and may qualify users for trading-fee rebates depending on venue policies.\n\n### Crypto exchanges (API keys)\n\n| Exchange | Signup Link |\n|----------|-------------|\n| Binance | [Register](https://www.bsmkweb.cc/register?ref=QUANTDINGER) |\n| Bitget | [Register](https://partner.hdmune.cn/bg/7r4xz8kd) |\n| Bybit | [Register](https://partner.bybit.com/b/DINGER) |\n| OKX | [Register](https://www.xqmnobxky.com/join/QUANTDINGER) |\n| Gate.io | [Register](https://www.gateport.business/share/DINGER) |\n| HTX | [Register](https://www.htx.com/invite/zh-cn/1f?invite_code=dinger) |\n\n### Forex / CFD — TMGM (MetaTrader 5)\n\n| Broker | Signup Link |\n|--------|-------------|\n| TMGM (MT5) | [Register](https://portal.tmgm.com/register?node=MTM0Mzc5\u0026language=en) |\n\nAfter opening a TMGM account, install MetaTrader 5 and bind your server/login under **Profile → Exchange** or **Broker Accounts**.\n\n## License and Commercial Terms\n\n- Backend source code is licensed under **Apache License 2.0**. See `LICENSE`.\n- This repository distributes the frontend UI here as **prebuilt files** for integrated deployment.\n- The frontend source code is available separately at [QuantDinger Frontend](https://github.com/brokermr810/QuantDinger-Vue) under the **QuantDinger Frontend Source-Available License v1.0**.\n- Under that frontend license, non-commercial use and eligible qualified non-profit use are permitted free of charge, while commercial use requires a separate commercial license from the copyright holder.\n- Trademark, branding, attribution, and watermark usage are governed separately and may not be removed or altered without permission. See `TRADEMARKS.md`.\n\nFor commercial licensing, frontend source access, branding authorization, or deployment support:\n\n- Website: [quantdinger.com](https://quantdinger.com)\n- Telegram: [t.me/worldinbroker](https://t.me/worldinbroker)\n- Email: [support@quantdinger.com](mailto:support@quantdinger.com)\n\n## Legal Notice and Compliance\n\nQuantDinger is intended for **lawful** research, education, and compliant trading only—not for fraud, market manipulation, sanctions evasion, money laundering, or other illegal activity. Operators must follow applicable laws, licensing, and exchange rules in every jurisdiction where they deploy. **This project does not provide legal, tax, investment, or regulatory advice.** You use the software at your own risk; to the extent permitted by law, contributors disclaim liability for trading losses, service interruption, or regulatory enforcement arising from use or misuse.\n\n## Community and Support\n\n\u003cp\u003e\n  \u003ca href=\"https://t.me/quantdinger\"\u003e\u003cimg src=\"https://img.shields.io/badge/Telegram-Group-26A5E4?style=for-the-badge\u0026logo=telegram\" alt=\"Telegram\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.com/invite/tyx5B6TChr\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-Server-5865F2?style=for-the-badge\u0026logo=discord\" alt=\"Discord\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://youtube.com/@quantdinger\"\u003e\u003cimg src=\"https://img.shields.io/badge/YouTube-Channel-FF0000?style=for-the-badge\u0026logo=youtube\" alt=\"YouTube\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n- [Contributing Guide](CONTRIBUTING.md)\n- [Contributors](CONTRIBUTORS.md)\n- [Report Bugs / Request Features](https://github.com/brokermr810/QuantDinger/issues)\n- Email: [support@quantdinger.com](mailto:support@quantdinger.com)\n\n## Support the Project\n\nCrypto donations:\n\n```text\n0x96fa4962181bea077f8c7240efe46afbe73641a7\n```\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=brokermr810/QuantDinger\u0026type=Date)](https://star-history.com/#brokermr810/QuantDinger\u0026Date)\n\n## Acknowledgements\n\nQuantDinger stands on top of a strong open-source ecosystem. Special thanks to projects such as:\n\n- [Flask](https://flask.palletsprojects.com/)\n- [Pandas](https://pandas.pydata.org/)\n- [CCXT](https://github.com/ccxt/ccxt)\n- [yfinance](https://github.com/ranaroussi/yfinance)\n- [Vue.js](https://vuejs.org/)\n- [Ant Design Vue](https://antdv.com/)\n- [KLineCharts](https://github.com/klinecharts/KLineChart)\n- [ECharts](https://echarts.apache.org/)\n- [Capacitor](https://capacitorjs.com/)\n- [bip-utils](https://github.com/ebellocchia/bip_utils)\n\n## P.S. — A Note on the Name\n\n**QuantDinger** is a small tribute to **[Erwin Schrödinger](https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger)** — the \"-dinger\" in our name is the tail of \"Schrödinger\". The cat in the box was a thought experiment; every un-fired strategy is its own little version of it — simultaneously winning and losing until the order actually fills. Backtests open the box. Live trading collapses the wavefunction. Trade carefully.\n\n\u003cp align=\"center\"\u003e\u003csub\u003eIf QuantDinger is useful to you, a GitHub star helps the project a lot.\u003c/sub\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrokermr810%2Fquantdinger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrokermr810%2Fquantdinger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrokermr810%2Fquantdinger/lists"}