[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75888":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":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":43,"readmeContent":44,"aiSummary":45,"trendingCount":15,"starSnapshotCount":15,"syncStatus":46,"lastSyncTime":47,"discoverSource":48},75888,"okx-agent-trade-kit","dex-original\u002Fokx-agent-trade-kit","dex-original","okx trading bot okx agent mcp cli cryptocurrency okx api automated trading typescript okx trading bot model context protocol cursor ai trading crypto spot futures okx trading bot npm pnpm okx mcp open source quant defi cex okx trading bot algorithmic trading crypto bot okx trading bot okx api mcp okx trading bot crypto mcp","https:\u002F\u002Fgithub.com\u002Fdex-original\u002Fokx-agent-trade-kit",null,"TypeScript",106,2294,1,0,200,10,"MIT License",false,"master",true,[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"ai-trading","algorithmic-trading","automated-trading","cex","cli","crypto","cryptocurrency","defi","futures","mcp","model-context-protocol","npm","okx","okx-api","open-source","pnpm","quant","spot","trading-bot","typescript","2026-06-12 02:03:37","# OKX Agent Trade Kit\n\n**Repository:** [github.com\u002Fdex-original\u002Fokx-agent-trade-kit](https:\u002F\u002Fgithub.com\u002Fdex-original\u002Fokx-agent-trade-kit)\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fdex-original\u002Fokx-agent-trade-kit\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fdex-original\u002Fokx-agent-trade-kit\u002Factions\u002Fworkflows\u002Fci.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdex-original\u002Fokx-agent-trade-kit\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdex-original\u002Fokx-agent-trade-kit)\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| **145 tools across 11 modules** | Full trading lifecycle: market data → orders → algo orders → account management → earn → trading bots → event contracts → news → smart money signals |\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| `smartmoney` | 5 | Smart money signals: multi-currency overview, single-currency consensus signal, signal history timeline, trader leaderboard, trader detail (composite) — all read-only | [→](docs\u002Fmodules\u002Fsmartmoney.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> **Naming note** — CLI subcommands use **spaces** (`okx swap algo place`). AI agents see the same features under underscored MCP tool names (`swap_place_algo_order`). Do not convert MCP identifiers into hyphen-joined CLI commands — `okx swap place-algo` is not valid. See [CLI reference · CLI vs MCP tool names](docs\u002Fcli-reference.md#cli-vs-mcp-tool-names).\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| [`okx-cex-smartmoney`](skills\u002Fokx-cex-smartmoney\u002FSKILL.md) | Smart Money: trader leaderboard, consensus signals, position analysis | 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\u002Fdex-original\u002Fokx-agent-trade-kit.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 是一个基于AI的交易工具包，旨在通过Model Context Protocol将AI助手直接连接到用户的OKX账户。其核心功能包括145种工具跨越11个模块，支持完整的交易生命周期管理，内置算法订单如条件单、OCO止盈止损单等，并提供安全性控制选项如只读模式和模块过滤。该项目采用TypeScript编写，以本地进程方式运行，无需云服务或数据库支持，适用于希望在终端环境下利用AI进行加密货币现货与期货自动交易、量化分析以及DeFi操作的专业人士。此外，它遵循MCP标准，可与多种MCP兼容客户端协同工作，是一个开源项目，确保了API密钥的安全性。",2,"2026-06-11 03:53:37","CREATED_QUERY"]