okx-cex-trade

Execute and manage spot, swap, futures, options, and event contract orders on OKX via CLI.

100|2.3k|Updated May 14, 2026
One-click install
npx skills add https://github.com/dex-original/okx-agent-trade-kit --skill okx-cex-trade-dex-original
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-cex-trade
Source: https://github.com/dex-original/okx-agent-trade-kit/tree/main/skills/okx-cex-trade
Command: npx skills add https://github.com/dex-original/okx-agent-trade-kit --skill okx-cex-trade-dex-original

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @okx_ai/okx-trade-cli, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a command-line interface to trade on OKX, allowing users to execute orders, manage positions, and monitor their trading activities without the need for a web interface.

Core Features & Use Cases

  • Order Execution: Place, cancel, and amend orders for various financial instruments, including spot, swaps, futures, options, and event contracts.
  • Position Management: Monitor open positions, close positions, and set leverage.
  • Data Retrieval: Access market data, order details, and fill history.
  • Use Case: A user can specify a market order to buy 0.01 BTC at the best available price or set a limit order to sell 0.01 BTC at $100,000.

Quick Start

Use the okx-cex-trade skill to place a market order to buy 0.01 BTC on OKX.

Frequently Asked Questions about okx-cex-trade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute a spot or futures order on OKX using a command-line interface?

To execute an OKX trade via CLI, you use the okx-cex-trade skill to place, amend, or cancel spot, swap, futures, and options orders. It directly processes market and limit orders without needing the OKX web interface.

Can I manage open positions and set leverage on OKX through the command line?

Yes, you can manage OKX positions through the CLI by monitoring open positions, closing existing trades, and setting leverage. The skill handles position management operations entirely through terminal commands.

Do I need API credentials to trade crypto on OKX via the command line?

Yes, executing trades and managing positions on OKX via CLI requires valid OKX API credentials. You must also install the @okx_ai/okx-trade-cli package dependency to authenticate and route commands successfully.

What financial instruments are supported for order execution on OKX CLI?

The OKX CLI supports order execution for spot, swaps, futures, options, and event contracts. You can specify market or limit orders for these instruments directly from your command line environment.

How does trading on OKX via CLI compare to using the web interface?

Trading on OKX via CLI bypasses the web interface to allow direct order execution, position management, and data retrieval. This approach enables automated trading workflows and scriptable access to your OKX account.

Can I retrieve market data and fill history for my OKX trades through the terminal?

Yes, the OKX CLI skill retrieves market data, order details, and fill history directly from the terminal. It queries your trading activities and returns the results for analysis without requiring a web browser.