← Back to directory
O

OKX Agent Trade Kit

Community
Connect AI assistants directly to your OKX account via MCP, with local, secure trading.
GitHub source repository ↗
★ 97 Stars Category · Other Popular Source revision f619ddf3bb4a
68FMRS · C
Reliability
10/20
Security and permissions
14/20
Maintenance
15/20
Documentation
16/20
Setup experience
13/20

OKX Agent Trade Kit is a feature-rich, open-source, privacy-focused tool for OKX trading, offering a wide range of tools and CLI support, ideal for AI-assisted trading. Safety controls (read-only mode, rate limiting) enhance security, but trading risks remain the user's responsibility.

Read the FMRS scoring method →

OKX Agent Trade Kit is an open-source toolkit that connects AI assistants to your OKX trading account via the Model Context Protocol (MCP). It provides 145 tools across 11 modules covering market data, spot, swap, futures, options, account, earn, trading bots, news, and smart money signals. It runs as a local process with API keys stored only on your machine; no cloud services, no data leaving your device. Includes both an MCP server and a CLI, with safety controls like --read-only flag, per-module filtering, and built-in rate limiter.

Tools

The tool list has not been reviewed yet.

Setup

  1. Install Node.js >= 18.
  2. Run npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli.
  3. Run okx config init to configure OKX API credentials (interactive wizard).
  4. Register the MCP server with your AI client using okx-trade-mcp setup, e.g., okx-trade-mcp setup --client claude-desktop.

Fit and risk

Best for

  • Traders who want to leverage AI assistants for cryptocurrency trading
  • Users who value local operation and data privacy
  • Developers who want to integrate trading functionality into MCP-compatible clients like Claude Desktop or Cursor
  • Users who need automated trading strategies (grid, DCA)

Not for

  • Beginners unfamiliar with cryptocurrency trading (requires basic knowledge)
  • Users who need cloud or remote server operation (designed as a local process)
  • Users who need support for other exchanges (OKX only)
  • Users who prefer a GUI over CLI or AI interaction

Required permissions

  • Read market data (no authentication required)
  • Trading operations (requires OKX API credentials): spot, swap, futures, options, etc. - place, cancel, query
  • Account management: query balance, bills, positions, fee rates, etc.
  • Earn operations: purchase, redeem, staking, etc.
  • Trading bot operations: create and manage grid and DCA strategies

Risks and side effects

  • API key leakage could lead to asset loss; store keys securely
  • Trading operations carry risk; AI may execute unintended commands; consider using read-only mode initially
  • Local process depends on Node.js environment; keep npm packages updated
  • Market volatility can lead to losses; use caution

Troubleshooting

  1. Ensure Node.js >= 18 is installed
  2. Check API key configuration is correct (`okx config init`)
  3. Inspect the structured error output (for tool calls or CLI), which includes error code and endpoint
  4. Use correct tool naming: MCP tools use underscores (e.g., `swap_place_order`), CLI subcommands use spaces (e.g., `okx swap place`)

Use cases

Use AI assistants for OKX trading operations, such as market data queries, order placement, and position management
Automate trading strategies like grid or DCA using trading bot tools
Analyze market trends with Smart Money signals
Execute trading commands quickly from the terminal using the CLI

Supported clients

Claude DesktopFull support
CursorFull support
Claude CodeFull support
VS CodeFull support