Okx Agent Trade Kit logo

Okx Agent Trade Kit

Organization
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

Publisherdex-original
Repositoryokx-agent-trade-kit
LanguageTypeScript
Forks
2.3K
Stars
111
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    Okx Agent Trade Kit exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    111 stars and 2.3K forks from the linked repository.

OKX Agent Trade Kit

Repository: github.com/dex-original/okx-agent-trade-kit

CI codecov npm: mcp npm downloads: mcp npm: cli npm downloads: cli License: MIT

English | 中文

OKX Agent Trade Kit — an AI-powered trading toolkit with two standalone packages:

PackageDescription
okx-trade-mcpMCP server for Claude / Cursor and any MCP-compatible AI client
okx-trade-cliCLI 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

FeatureDescription
145 tools across 11 modulesFull trading lifecycle: market data → orders → algo orders → account management → earn → trading bots → event contracts → news → smart money signals
Algo orders built-inConditional, OCO take-profit/stop-loss, trailing stop
Safety controls--read-only flag, per-module filtering, built-in rate limiter
Zero infrastructureLocal stdio process, no server or database required
MCP standardWorks with Claude Desktop, Cursor, openCxxW, and any MCP-compatible client
Agent Skills includedPre-built skill files for AI agent frameworks — drop-in instructions covering market data, trading, portfolio, bots, and earn
Open sourceMIT license, API keys never leave your machine

Modules

ModuleToolsDescriptionDocs
market19Ticker, 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), indicator list, market filter (screen by price/change/marketCap/volume/fundingRate/OI), OI history, OI change filter→
spot13Place/cancel/amend orders, batch orders, fills (+archive), order history (+archive), conditional orders, OCO→
swap17Perpetual trading, batch orders, positions, leverage, conditional orders, OCO, trailing stop→
futures18Delivery contract trading, positions, fills, order history, amend/close/leverage, batch orders, algo orders (TP/SL, OCO, trailing stop)→
option10Options trading: place/cancel/amend/batch-cancel, order history, positions (with Greeks), fills, option chain, IV + Greeks→
account14Balance, bills (+archive), positions, positions history, fee rates, config, position mode, max withdrawal, max avail size, audit log→
event9Event contract trading: browse, series, events, markets (query); place, amend, cancel, orders, fills (private). Semantic outcome values: UP/YES/DOWN/NO→
earn23Simple Earn: balance, purchase, redeem, lending rate, fixed-term orders (10). On-chain staking/DeFi (6). Dual Currency Deposit/双币赢 (6). Flash Earn (1). Sub-modules: earn.savings, earn.onchain, earn.dcd, earn.flash. Included in all.→
bot10Trading bots: Grid (5) and DCA — Spot & Contract (5). Sub-modules: bot.grid, bot.dca→
news7Crypto news: latest news, by-coin filter, full-text search, article detail, news sources, coin sentiment (snapshot + trend)→
smartmoney5Smart money signals: multi-currency overview, single-currency consensus signal, signal history timeline, trader leaderboard, trader detail (composite) — all read-only→

Quick Start

Prerequisites: Node.js >= 18

bash
# 1. Install
npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli

# 2. Configure OKX API credentials (interactive wizard)
okx config init

# 3. Register the MCP server with your AI client
okx-trade-mcp setup --client claude-desktop
okx-trade-mcp setup --client cursor
okx-trade-mcp setup --client claude-code
okx-trade-mcp setup --client vscode          # writes .mcp.json in current directory

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

bash
okx-trade-mcp                                        # default: spot, swap, account
okx-trade-mcp --modules market                       # market data only (no auth needed)
okx-trade-mcp --modules spot,account                 # spot trading + account
okx-trade-mcp --profile live --modules all           # all modules including earn
okx-trade-mcp --read-only                            # query tools only, no writes

Startup scenarios → — VS Code · Windsurf →


okx-trade-cli

bash
okx market ticker BTC-USDT
okx spot place --instId BTC-USDT --side buy --ordType market --sz 100
okx account balance

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.

Full CLI reference →


Agent Skills

Pre-built skill files for AI agent frameworks are included in the skills/ directory. Each skill tells the agent when to activate and how to use the okx CLI for a specific task category.

SkillDescriptionAuth
okx-cex-marketMarket data: prices, candles, order books, funding rates, technical indicatorsNo
okx-cex-tradeOrder management: spot, swap, futures, options, algo ordersYes
okx-cex-portfolioAccount: balances, positions, P&L, transfersYes
okx-cex-botTrading bots: grid and DCA (spot & contract)Yes
okx-cex-earnEarn: Simple Earn, On-chain staking, Dual Investment, AutoEarnYes
okx-cex-smartmoneySmart Money: trader leaderboard, consensus signals, position analysisYes

Skills documentation →


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:

json
{
  "tool": "swap_place_order",
  "error": true,
  "type": "OkxApiError",
  "code": "51020",
  "message": "Order quantity invalid",
  "endpoint": "POST /api/v5/trade/order",
  "traceId": "abc123def456",
  "timestamp": "2026-03-03T10:00:00.000Z",
  "serverVersion": "1.0.4"
}

CLI — paste the full stderr output:

Error: Order quantity invalid
TraceId: abc123def456
Hint: Check order size against instrument minSz.
Version: okx-trade-cli@1.0.4

See FAQ → for common issues.


Build from Source

bash
git clone https://github.com/dex-original/okx-agent-trade-kit.git && cd okx-trade-mcp
pnpm install && pnpm build

See CONTRIBUTING.md for the full development guide.

packages/
├── core/    # shared client & tools
├── mcp/     # MCP Server
└── cli/     # CLI tool

Documentation

DocumentDescription
ArchitectureSystem design and module overview
ContributingDevelopment setup and PR guidelines
ChangelogVersion history
Agent SkillsPre-built skills for AI agent frameworks
SecurityVulnerability reporting

Use Okx Agent Trade Kit MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Okx Agent Trade Kit is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Okx Agent Trade Kit as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Okx Agent Trade Kit MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "okx-agent-trade-kit": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Okx Agent Trade Kit MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Okx Agent Trade Kit MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Okx Agent Trade Kit to help me with this task?
Okx Agent Trade Kit
Sure. I read it.
Here is what I found using Okx Agent Trade Kit.

Frequently asked questions

What is the Okx Agent Trade Kit MCP server used for?

Okx Agent Trade Kit is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Okx Agent Trade Kit MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Okx Agent Trade Kit with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Okx Agent Trade Kit MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Okx Agent Trade Kit connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Okx Agent Trade Kit MCP to TypingMind?

Okx Agent Trade Kit runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Okx Agent Trade Kit MCP provide in TypingMind?

Okx Agent Trade Kit exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Okx Agent Trade Kit MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Okx Agent Trade Kit requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇