← Back to directory
D

Dex Trade Agent Kit

Community
Local MCP server that connects OKX trading to AI assistants
GitHub source repository ↗
★ 127 Stars Category · Other Popular Source revision 16944d11f930
30FMRS · D
Reliability
4/20
Security and permissions
5/20
Maintenance
5/20
Documentation
9/20
Setup experience
7/20

This MCP server provides comprehensive trading functionality across multiple modules, runs locally for privacy, and is suitable for technical users. However, caution is needed when dealing with real funds.

Read the FMRS scoring method →

DEX Agent Trade Kit is an AI-powered trading toolkit with two standalone packages: dex-trade-mcp (an MCP server for Claude, Cursor, and any MCP-compatible AI client) and dex-trade-cli (a CLI for operating several exchanges from the terminal). It connects AI assistants directly to your OKX account via the Model Context Protocol (MCP). It runs as a local process with API keys stored only on your machine, no cloud services. Features 145 tools across 11 modules: market data, spot, swap, futures, options, account management, event contracts, earn, trading bots, news, and smart money signals. Includes built-in algo orders (conditional, OCO take-profit/stop-loss, trailing stop), safety controls (--read-only flag, per-module filtering, built-in rate limiter), zero infrastructure (local stdio process), and pre-built agent skills.

Tools

market_get_ticker
Get market ticker
market_get_orderbook
Get orderbook
market_get_candles
Get candles
market_get_index_ticker
Get index ticker
market_get_index_candles
Get index candles
market_get_price_limit
Get price limit
market_get_funding_rate
Get funding rate
market_get_mark_price
Get mark price
market_get_open_interest
Get open interest
market_get_stock_tokens
Get stock tokens
market_get_indicators
Get technical indicators
market_get_indicator_list
Get indicator list
market_filter_market
Filter markets by criteria
market_get_oi_history
Get open interest history
market_get_oi_change_filter
Filter by open interest change
spot_place_order
Place spot order
spot_cancel_order
Cancel spot order
spot_amend_order
Amend spot order
spot_batch_orders
Batch spot orders
spot_get_fills
Get spot fills
spot_get_order_history
Get spot order history
spot_place_conditional_order
Place conditional order
spot_cancel_conditional_order
Cancel conditional order
spot_place_oco_order
Place OCO order
spot_cancel_oco_order
Cancel OCO order
swap_place_order
Place swap order
swap_cancel_order
Cancel swap order
swap_amend_order
Amend swap order
swap_batch_orders
Batch swap orders
swap_get_positions
Get swap positions
swap_set_leverage
Set leverage
swap_place_conditional_order
Place swap conditional order
swap_cancel_conditional_order
Cancel swap conditional order
swap_place_oco_order
Place swap OCO order
swap_cancel_oco_order
Cancel swap OCO order
swap_place_trailing_stop
Place trailing stop order
swap_cancel_trailing_stop
Cancel trailing stop order
futures_place_order
Place futures order
futures_cancel_order
Cancel futures order
futures_amend_order
Amend futures order
futures_close_position
Close futures position
futures_set_leverage
Set futures leverage
futures_batch_orders
Batch futures orders
futures_place_algo_order
Place algo order
futures_cancel_algo_order
Cancel algo order
futures_get_positions
Get futures positions
futures_get_fills
Get futures fills
futures_get_order_history
Get futures order history
option_place_order
Place option order
option_cancel_order
Cancel option order
option_amend_order
Amend option order
option_batch_cancel
Batch cancel options
option_get_order_history
Get option order history
option_get_positions
Get option positions
option_get_fills
Get option fills
option_get_chain
Get option chain
option_get_iv_greeks
Get IV and Greeks
account_get_balance
Get account balance
account_get_bills
Get account bills
account_get_positions
Get account positions
account_get_positions_history
Get positions history
account_get_fee_rates
Get fee rates
account_get_config
Get account config
account_set_position_mode
Set position mode
account_get_max_withdrawal
Get max withdrawal
account_get_max_avail_size
Get max available size
account_get_audit_log
Get audit log
event_browse_contracts
Browse event contracts
event_get_series
Get event series
event_get_events
Get events
event_get_markets
Get markets
event_place_order
Place event order
event_amend_order
Amend event order
event_cancel_order
Cancel event order
event_get_orders
Get event orders
event_get_fills
Get event fills
earn_get_balance
Get earn balance
earn_purchase
Purchase earn product
earn_redeem
Redeem earn product
earn_get_lending_rate
Get lending rate
earn_place_fixed_term_order
Place fixed-term order
earn_get_fixed_term_orders
Get fixed-term orders
earn_get_onchain_staking
Get on-chain staking info
earn_stake
Stake on-chain
earn_unstake
Unstake on-chain
earn_get_dcd_products
Get dual currency deposit products
earn_place_dcd_order
Place DCD order
earn_get_flash_earn
Get flash earn
bot_create_grid
Create grid bot
bot_amend_grid
Amend grid bot
bot_close_grid
Close grid bot
bot_get_grid_orders
Get grid orders
bot_create_dca
Create DCA bot
bot_amend_dca
Amend DCA bot
bot_close_dca
Close DCA bot
bot_get_dca_orders
Get DCA orders
news_get_latest
Get latest news
news_filter_by_coin
Filter news by coin
news_search
Search news
news_get_article
Get article detail

Setup

  1. Ensure Node.js >= 18. 2. Install globally: npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli. 3. Configure OKX API credentials: run okx config init and follow the interactive wizard. 4. Register the MCP server with your AI client using okx-trade-mcp setup --client claude-desktop or other clients (cursor, claude-code, vscode). Alternatively, use the one-line install script that handles Node.js check, installation, and client detection automatically.
claude_desktop_config.json
{
  "mcpServers": {
    "okx-trade-mcp": {
      "command": "okx-trade-mcp",
      "args": [
        "--modules",
        "all"
      ]
    }
  }
}

Fit and risk

Best for

  • Traders using AI assistants like Claude or Cursor
  • Traders needing automation and algorithmic orders
  • Users who prefer local execution and no cloud dependency
  • Analysts needing unauthenticated market data and indicators

Not for

  • Users who don't want to run a local terminal or dislike CLI
  • Non-OKX users (only supports OKX exchange)
  • Users needing mobile or web interfaces rather than local process
  • Users with strict security requirements on API keys (though keys are stored locally)

Required permissions

  • Requires OKX API keys (read and write) for trading operations
  • No authentication needed for market data modules
  • May require specific API permissions enabled depending on modules used, such as trade, withdraw, earn, etc.
  • Runs as local stdio process, no external network services (but may make requests to OKX API)

Risks and side effects

  • Real money trading risk: AI may execute orders incorrectly
  • API keys stored locally; ensure your machine is secure
  • Tools can change account state in real time (e.g., leverage, position mode)
  • Dependency on OKX API stability, potential rate limits or service outages
  • Misconfiguration can result in invalid order parameters or unintended trades

Troubleshooting

  1. Ensure Node.js version >= 18
  2. Run `okx config init` to reconfigure credentials
  3. Check API key permissions are sufficient
  4. Examine the structured error block in tool output (includes tool name, error code, endpoint, traceId) and diagnose accordingly
  5. If using VS Code, confirm .mcp.json file is generated
  6. See FAQ doc docs/faq.md for common issues

Use cases

Execute spot, futures, and options trades via natural language with AI assistants
Get real-time market data, technical indicators, and price screening
Manage account balances, positions, and fee settings
Create and manage grid or DCA trading bots
Participate in earn products, on-chain staking, and dual currency deposits
Track crypto news and smart money signals

Supported clients

Claude DesktopFull support
CursorFull support
Claude CodeFull support
VS CodeFull support