Cryptoquant AI
CryptoQuant AI is an advanced, open-source quantitative trading platform designed to bridge the gap between algorithmic market execution and artificial intelligence. Built entirely on a modern Node.js, Vite, and TypeScript stack, this project provides a robust, highly responsive frontend dashboard paired with powerful automation capabilities.
Install / Use
npx skills add Markfans/cryptoquant-aiInstalls into whichever agent you are using.
README
CryptoQuant AI
CryptoQuant AI is a local-first quantitative cryptocurrency trading dashboard for research, monitoring, backtesting, and optional OKX execution. It combines a React/Vite frontend with an Express/TypeScript backend, local SQLite persistence, OKX market/account integrations, Zhipu GLM-assisted summaries, and risk controls for strategy evaluation.
This project is for research and personal operations. It is not financial advice. Use demo trading first, keep API permissions limited, and never expose this service directly to the public internet without proper hardening.
Features
- OKX market data, account balance, positions, order history, and order submission support.
- Demo and live OKX credential paths with a local encrypted credential store.
- Regime-based strategy engine with trend breakout, mean reversion, macro risk gating, TP/SL construction, and risk kill switch behavior.
- Shadow trading, walk-forward backtesting, portfolio return analytics, execution diagnostics, reliability views, and audit trails.
- Local SQLite and JSON persistence for trades, state, risk events, and research snapshots.
- React dashboard with legacy embedded panels for existing operational workflows.
Prerequisites
- Node.js 24 or newer.
- npm 10 or newer.
- Git.
- Optional OKX API credentials for live or demo trading.
- Optional Zhipu GLM API key for AI-assisted summaries.
- Optional FRED API key for macro data.
- Optional local HTTP/SOCKS proxy if your network cannot reach OKX directly.
Installation
git clone https://github.com/YOUR_GITHUB_USERNAME/cryptoquant-ai.git
cd cryptoquant-ai
npm ci
copy .env.example .env
On macOS or Linux, use:
cp .env.example .env
Edit .env and replace every YOUR_..._HERE value with your own local credentials. Leave optional services blank if you do not use them.
Usage
Start the local development server:
npm run dev
Then open:
http://localhost:3000
Build for production:
npm run build
npm run start:prod
Run validation:
npm run lint
npm test
npm run build
Windows users can also run 一键启动.bat from the project root. The script checks Node/npm, installs dependencies, creates .env from .env.example when needed, runs type checks, and starts the app.
Configuration
The app reads configuration from .env. Important variables include:
ADMIN_USERNAME,ADMIN_PASSWORD,SESSION_TTL_HOURSfor local operator login.APP_SECRETfor local encrypted credential storage.OKX_API_KEY,OKX_SECRET_KEY,OKX_PASSPHRASEfor OKX live mode.OKX_DEMO_API_KEY,OKX_DEMO_SECRET_KEY,OKX_DEMO_PASSPHRASEfor OKX demo mode.EXCHANGE_PROXY_URLfor optional proxy routing, for examplehttp://127.0.0.1:10808.ZHIPU_API_KEYand model settings for AI-assisted summaries.FRED_API_KEYfor macro data.SMTP_USER,SMTP_PASS,SMTP_TOfor optional email notifications.
Never commit .env, data/, logs, SQLite files, screenshots containing account information, or encrypted credential stores.
Security Notes
- Start with OKX demo trading before live trading.
- Restrict exchange API keys to the minimum permissions needed.
- Do not put API keys in frontend code.
- Use a long random
APP_SECRETbefore saving credentials in the local vault. - Keep this service behind local authentication and do not publish it as an unauthenticated public web app.
- Review generated orders, leverage, take-profit, and stop-loss behavior before enabling live execution.
License
MIT. See LICENSE.
Related Skills
obsidian
385.6kWork with Obsidian vaults using the official obsidian CLI: read/search/create/edit notes, tasks, links, properties, plugins.
Writing Hookify Rules
140.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
agent-tui
106.4kMain Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications programmatically for testing, automation, and inspection
review-duplication
106.4kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
