[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1492":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":15,"starSnapshotCount":15,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},1492,"agent-trade-kit","6551-Team\u002Fagent-trade-kit","6551-Team","OKX Agent Trade Kit: MCP server and CLI to connect AI assistants (Claude, Cursor) to your OKX account via Model Context Protocol. Local, MIT, TypeScript monorepo.","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fokx-trade-mcp",null,"TypeScript",205,122,210,0,46.27,"MIT License",false,"main",[21,22,23,24,25,26,27,28,29,30,31],"artificial-intelligence","claude","cli","cryptocurrency","cursor","mcp","model-context-protocol","nodejs","okx","trading","typescript","2026-06-12 04:00:09","# OKX Agent Trade Kit\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fokx\u002Fagent-tradekit\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fokx\u002Fagent-tradekit\u002Factions\u002Fworkflows\u002Fci.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fokx\u002Fagent-tradekit\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fokx\u002Fagent-tradekit)\n[![npm: mcp](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fokx-trade-mcp?label=okx-trade-mcp)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fokx-trade-mcp)\n[![npm downloads: mcp](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fokx-trade-mcp?label=mcp+total+downloads)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fokx-trade-mcp)\n[![npm: cli](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fokx-trade-cli?label=okx-trade-cli)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fokx-trade-cli)\n[![npm downloads: cli](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fokx-trade-cli?label=cli+total+downloads)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fokx-trade-cli)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](LICENSE)\n\n[English](README.md) | [中文](README.zh-CN.md)\n\nOKX Agent Trade Kit — an AI-powered trading toolkit with two standalone packages:\n\n| Package | Description |\n|---|---|\n| `okx-trade-mcp` | MCP server for Claude \u002F Cursor and any MCP-compatible AI client |\n| `okx-trade-cli` | CLI for operating OKX from terminal |\n\n---\n\n## What is this?\n\nOKX Agent Trade Kit connects AI assistants directly to your OKX account via the [Model Context Protocol](https:\u002F\u002Fmodelcontextprotocol.io). Instead of switching between your AI and the exchange UI, you describe what you want — the AI calls the right tools and executes it.\n\nIt runs as a **local process** with your API keys stored only on your machine. No cloud services, no data leaving your device.\n\n## Features\n\n| Feature | Description |\n|---------|-------------|\n| **140 tools across 10 modules** | Full trading lifecycle: market data → orders → algo orders → account management → earn → trading bots → event contracts → news |\n| **Algo orders built-in** | Conditional, OCO take-profit\u002Fstop-loss, trailing stop |\n| **Safety controls** | `--read-only` flag, per-module filtering, built-in rate limiter |\n| **Zero infrastructure** | Local stdio process, no server or database required |\n| **MCP standard** | Works with Claude Desktop, Cursor, openCxxW, and any MCP-compatible client |\n| **Agent Skills included** | Pre-built skill files for AI agent frameworks — drop-in instructions covering market data, trading, portfolio, bots, and earn |\n| **Open source** | MIT license, API keys never leave your machine |\n\n## Modules\n\n| Module | Tools | Description | Docs |\n|--------|-------|-------------|------|\n| `market` | 19 | Ticker, orderbook, candles (+history), index ticker, index candles, price limit, funding rate, mark price, open interest, stock tokens, **technical indicators** (70+ indicators: MA\u002FEMA\u002FRSI\u002FMACD\u002FBB\u002FATR\u002FKDJ\u002FBTCRAINBOW\u002FAHR999 and more — no auth required), **indicator list**, **market filter** (screen by price\u002Fchange\u002FmarketCap\u002Fvolume\u002FfundingRate\u002FOI), **OI history**, **OI change filter** | [→](docs\u002Fmodules\u002Fmarket.md) |\n| `spot` | 13 | Place\u002Fcancel\u002Famend orders, batch orders, fills (+archive), order history (+archive), conditional orders, OCO | [→](docs\u002Fmodules\u002Fspot.md) |\n| `swap` | 17 | Perpetual trading, batch orders, positions, leverage, conditional orders, OCO, trailing stop | [→](docs\u002Fmodules\u002Fswap.md) |\n| `futures` | 18 | Delivery contract trading, positions, fills, order history, amend\u002Fclose\u002Fleverage, batch orders, algo orders (TP\u002FSL, OCO, trailing stop) | [→](docs\u002Fmodules\u002Ffutures.md) |\n| `option` | 10 | Options trading: place\u002Fcancel\u002Famend\u002Fbatch-cancel, order history, positions (with Greeks), fills, option chain, IV + Greeks | [→](docs\u002Fmodules\u002Foption.md) |\n| `account` | 14 | Balance, bills (+archive), positions, positions history, fee rates, config, position mode, max withdrawal, max avail size, audit log | [→](docs\u002Fmodules\u002Faccount.md) |\n| `event` | 9 | Event contract trading: browse, series, events, markets (query); place, amend, cancel, orders, fills (private). Semantic outcome values: UP\u002FYES\u002FDOWN\u002FNO | [→](docs\u002Fmodules\u002Fevent.md) |\n| `earn` | 23 | Simple Earn: balance, purchase, redeem, lending rate, **fixed-term orders** (10). On-chain staking\u002FDeFi (6). Dual Currency Deposit\u002F双币赢 (6). **Flash Earn** (1). Sub-modules: `earn.savings`, `earn.onchain`, `earn.dcd`, `earn.flash`. Included in `all`. | [→](docs\u002Fmodules\u002Fearn.md) |\n| `bot` | 10 | Trading bots: Grid (5) and DCA — Spot & Contract (5). Sub-modules: `bot.grid`, `bot.dca` | [→](docs\u002Fmodules\u002Fbot.md) |\n| `news` | 7 | Crypto news: latest news, by-coin filter, full-text search, article detail, news sources, coin sentiment (snapshot + trend) | [→](docs\u002Fmodules\u002Fnews.md) |\n\n---\n\n## Quick Start\n\n**Prerequisites:** Node.js >= 18\n\n```bash\n# 1. Install\nnpm install -g @okx_ai\u002Fokx-trade-mcp @okx_ai\u002Fokx-trade-cli\n\n# 2. Configure OKX API credentials (interactive wizard)\nokx config init\n\n# 3. Register the MCP server with your AI client\nokx-trade-mcp setup --client claude-desktop\nokx-trade-mcp setup --client cursor\nokx-trade-mcp setup --client claude-code\nokx-trade-mcp setup --client vscode          # writes .mcp.json in current directory\n```\n\n> **Alternative:** [One-line install script](docs\u002Fconfiguration.md#one-line-install) — handles Node.js check, install, and client detection automatically.\n>\n> For live trading, multiple profiles, or other clients, see [configuration →](docs\u002Fconfiguration.md).\n\n---\n\n## okx-trade-mcp\n\n```bash\nokx-trade-mcp                                        # default: spot, swap, account\nokx-trade-mcp --modules market                       # market data only (no auth needed)\nokx-trade-mcp --modules spot,account                 # spot trading + account\nokx-trade-mcp --profile live --modules all           # all modules including earn\nokx-trade-mcp --read-only                            # query tools only, no writes\n```\n\n[Startup scenarios →](docs\u002Fconfiguration.md#startup-scenarios) — [VS Code · Windsurf →](docs\u002Fconfiguration.md)\n\n---\n\n## okx-trade-cli\n\n```bash\nokx market ticker BTC-USDT\nokx spot place --instId BTC-USDT --side buy --ordType market --sz 100\nokx account balance\n```\n\n**[Full CLI reference →](docs\u002Fcli-reference.md)**\n\n---\n\n## Agent Skills\n\nPre-built skill files for AI agent frameworks are included in the [`skills\u002F`](skills\u002F) directory. Each skill tells the agent when to activate and how to use the `okx` CLI for a specific task category.\n\n| Skill | Description | Auth |\n|-------|-------------|:----:|\n| [`okx-cex-market`](skills\u002Fokx-cex-market\u002FSKILL.md) | Market data: prices, candles, order books, funding rates, technical indicators | No |\n| [`okx-cex-trade`](skills\u002Fokx-cex-trade\u002FSKILL.md) | Order management: spot, swap, futures, options, algo orders | Yes |\n| [`okx-cex-portfolio`](skills\u002Fokx-cex-portfolio\u002FSKILL.md) | Account: balances, positions, P&L, transfers | Yes |\n| [`okx-cex-bot`](skills\u002Fokx-cex-bot\u002FSKILL.md) | Trading bots: grid and DCA (spot & contract) | Yes |\n| [`okx-cex-earn`](skills\u002Fokx-cex-earn\u002FSKILL.md) | Earn: Simple Earn, On-chain staking, Dual Investment, AutoEarn | Yes |\n\n**[Skills documentation →](skills\u002FREADME.md)**\n\n---\n\n## Reporting Issues\n\nIf a tool call or CLI command fails, open an issue and include the full error output.\n\n**MCP** — copy the structured error block shown in your AI client:\n\n```json\n{\n  \"tool\": \"swap_place_order\",\n  \"error\": true,\n  \"type\": \"OkxApiError\",\n  \"code\": \"51020\",\n  \"message\": \"Order quantity invalid\",\n  \"endpoint\": \"POST \u002Fapi\u002Fv5\u002Ftrade\u002Forder\",\n  \"traceId\": \"abc123def456\",\n  \"timestamp\": \"2026-03-03T10:00:00.000Z\",\n  \"serverVersion\": \"1.0.4\"\n}\n```\n\n**CLI** — paste the full stderr output:\n\n```\nError: Order quantity invalid\nTraceId: abc123def456\nHint: Check order size against instrument minSz.\nVersion: okx-trade-cli@1.0.4\n```\n\nSee **[FAQ →](docs\u002Ffaq.md)** for common issues.\n\n---\n\n## Build from Source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fokx\u002Fagent-tradekit.git && cd okx-trade-mcp\npnpm install && pnpm build\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full development guide.\n\n```\npackages\u002F\n├── core\u002F    # shared client & tools\n├── mcp\u002F     # MCP Server\n└── cli\u002F     # CLI tool\n```\n\n---\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [Architecture](ARCHITECTURE.md) | System design and module overview |\n| [Contributing](CONTRIBUTING.md) | Development setup and PR guidelines |\n| [Changelog](CHANGELOG.md) | Version history |\n| [Agent Skills](skills\u002FREADME.md) | Pre-built skills for AI agent frameworks |\n| [Security](SECURITY.md) | Vulnerability reporting |\n","OKX Agent Trade Kit 是一个通过Model Context Protocol将AI助手（如Claude、Cursor）与您的OKX账户连接起来的交易工具包。它提供了140种工具，覆盖了从市场数据到订单执行、算法订单、账户管理等整个交易生命周期的核心功能，并内置了多种安全控制措施，例如只读模式和模块级过滤。该工具包以本地进程方式运行，无需云服务或数据库支持，确保了API密钥仅存储在用户设备上，不会泄露。适合需要利用AI增强交易决策能力，同时保持高度隐私性和自主性的加密货币交易者使用。",2,"2026-05-06 17:33:13","CREATED_QUERY"]