okx / agent-trade-kit
OKX trading MCP server — connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing okx/agent-trade-kit in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewOKX Agent Trade Kit English | 中文 OKX Agent Trade Kit — an AI-powered trading toolkit with two standalone packages: | Package | Description | |---|---| | | MCP server for Claude / Cursor and any MCP-compatible AI client | | | CLI for operating OKX from terminal | --- What is this? OKX Agent Trade Kit connects AI assistants directly to your OKX account via the Model Context Protocol. Instead of switching between your AI and the exchange UI, you describe what you want — the AI calls the right tools and executes it. It runs as a **local process** with your API keys stored only on your machine. No cloud services, no data leaving your device. Features | Feature | Description | |---------|-------------| | **107 tools across 8 modules** | Full trading lifecycle: market data → orders → algo orders → account management → earn → trading bots | | **Algo orders built-in** | Conditional, OCO take-profit/stop-loss, trailing stop | | **Safety controls** | flag, per-module filtering, built-in rate limiter | | **Zero infrastructure** | Local stdio process, no server or database required | | **MCP standard** | Works with Claude Desktop, Cursor, openCxxW, and any MCP-compatible client | | **Open source** | MIT license, API keys never leave your machine | Modules | Module | Tools | Description | Docs | |--------|-------|-------------|------| | | 14 | Ticker, orderbook, candles (+history), index ticker, index candles, price limit, funding rate, mark price, open interest, stock tokens, **technical indicators** (70+ indicators: MA/EMA/RSI/MACD/BB/ATR/KDJ/BTCRAINBOW/AHR999 and more — no auth required) | → | | | 13 | Place/cancel/amend orders, batch orders, fills (+archive), order history (+archive), conditional orders, OCO | → | | | 17 | Perpetual trading, batch orders, positions, leverage, conditional orders, OCO, trailing stop | → | | | 18 | Delivery contract trading, positions, fills, order history, amend/close/leverage, batch orders, algo orders (TP/SL, OCO, trailing stop) | → | | | 10 | Options trading: place/cancel/amend/batch-cancel, order history, positions (with Greeks), fills, option chain, IV + Greeks | → | | | 14 | Balance, bills (+archive), positions, positions history, fee rates, config, position mode, max withdrawal, max avail size, audit log | → | | | 19 | Simple Earn: balance, purchase, redeem, lending rate (7). On-chain staking/DeFi (6). Dual Currency Deposit/双币赢 (6). Sub-modules: , , . Included in . | → | | | 10 | Trading bots: Grid (5) and DCA (5). Sub-modules: , | → | --- Quick Start **Prerequisites:** Node.js >= 18 > **Alternative:** One-line install script — handles Node.js check, install, and client detection automatically. > > For live trading, multiple profiles, or other clients, see configuration →. --- okx-trade-mcp Startup scenarios → — VS Code · Windsurf → --- okx-trade-cli **Full CLI reference →** --- Reporting Issues If a tool call or CLI command fails, open an issue and include the full error output. **MCP** — copy the structured error block shown in your AI client: **CLI** — paste the full stderr output: See **FAQ →** for common issues. --- Build from Source See CONTRIBUTING.md for the full development guide. --- Documentation | Document | Description | |----------|-------------| | Architecture | System design and module overview | | Contributing | Development setup and PR guidelines | | Changelog | Version history | | Security | Vulnerability reporting |