okx-cex-trade Skill (OKX) for Claude: What It Does and How to Install It
Lets Claude place, cancel, amend and monitor OKX orders across spot, swap, futures, options and event contracts.
- Installs
- 10.4K
- on skills.sh
- Stars
- 200
- on GitHub
- Files
- 8
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
Ask Claude to buy, sell, go long or short, or set a take-profit or stop-loss, and it runs the matching command on the okx CLI, across spot, perpetual swap, delivery futures, options and event contracts. It also covers trailing stops, iceberg and TWAP algo orders, and reading option chains and Greeks.
Every trading command needs OKX API-key or OAuth credentials and a chosen mode, live or demo. SKILL.md says live mode uses real money and is irreversible, and tells Claude to confirm the mode on every authenticated command and append it to every response.
Good for
- Traders who want to place or manage OKX orders by chatting
- People who want take-profit, stop-loss or trailing stops set automatically
- Anyone trading OKX event contracts (Yes/No, Up/Down prediction markets)
Install okx-cex-trade
Claude Code
- 1
Copy this prompt.
Install the okx-cex-trade skill in Claude Code. Run this command: npm install -g @okx_ai/okx-trade-cli Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
This skill does nothing without the okx CLI, so install it first. It needs OKX API credentials or an OAuth login, which the sibling okx-cex-auth skill sets up: run its steps, or okx config init, before using this skill.
From the project README. Source.
What's in the skill
When it loads
Use when the user asks to 'buy BTC', 'sell ETH', 'place a limit order', 'place a market order', 'cancel my order', 'amend my order', 'long BTC perp', 'short ETH swap', 'open a position', 'close a position', 'set take profit', 'limit take profit', 'immediate TP', 'set stop loss', 'self-trade prevention', 'stpMode', 'auto-cancel on close', 'trailing stop', 'pending order', 'chase order', 'iceberg', 'TWAP', 'split order', 'large order', 'set leverage', 'check my orders', 'fill history', 'buy a call', 'sell a put', 'option chain', 'implied volatility', 'IV', 'Greeks', 'delta', 'gamma', 'event contract', 'buy Yes', 'buy No', 'buy Up', 'buy Down', 'prediction market', or any request to place, cancel, or amend spot, swap, futures, options, or event contract orders on OKX CEX. Covers conditional (TP/SL/trailing) algo orders. Requires API credentials. Do NOT use for market data (okx-cex-market), account balance (okx-cex-portfolio), or bots (okx-cex-bot).
Sections in SKILL.md
- Preflight
- Prerequisites
- Credential & Profile Check
- Step A — Verify credentials
- Step B — Confirm trading mode
- Handling Authentication Errors
- Demo vs Live Mode
- Skill Routing
- Sz Handling for Derivatives
- ⚠ CRITICAL: Always verify contract face value before placing orders
- SWAP and FUTURES orders
- Option orders
- Quickstart
- Command Index
- Spot Orders (12 commands)
- Swap / Perpetual Orders (15 commands)
Key facts
- License
- MIT
- Installs on skills.sh
- 10,438 (Nov 2, 2026)
- Last repo commit
- Oct 28, 2026
- Skill version
- 1.5.0, per the SKILL.md frontmatter
What it includes
Market, limit and conditional spot trades (12 commands)
Place, cancel and amend spot orders, plus TP/SL and trailing-stop algo orders, and read fills, open orders and leverage.
Try: “Buy 100 USDT of BTC at market price.”
Write ·
Spot ordersLong/short perpetual swaps with leverage (15 commands)
Place, cancel, amend and close swap positions, set leverage, and manage algo and trailing-stop orders.
Try: “Open a 2x long on ETH-USDT-SWAP with a 5% stop loss.”
Write ·
Swap/perpetual ordersDated futures contracts (15 commands)
The same order lifecycle as swaps, for delivery futures contracts with an expiry date.
Write ·
Futures/delivery ordersCalls, puts and Greeks (10 commands)
Reads option chains and Greeks (delta, gamma, theta, vega, implied volatility), and places, cancels and amends option orders.
Try: “What are the Greeks on the next BTC weekly call option?”
Write ·
Options ordersYes/No and Up/Down prediction markets (9 commands)
Browses event series and markets, and places, amends and cancels event-contract orders.
Write ·
Event contract ordersVerifies ctVal before any derivative order
SKILL.md tells Claude to call the instruments command for contract face value before placing any swap, futures or option order, since sizes vary by instrument.
Read ·
Contract face value check
From the official docs
Permissions
High risk
This skill can place real orders and move real money on your OKX account once you give it live credentials. Test with demo mode first and confirm the mode and the order details before every live order.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can place real trades with real money
In live mode, order and algo-order commands move real funds and SKILL.md calls live mode irreversible. Orders run on your own OKX account, so fills and losses are charged to it (our reading). SKILL.md asks the agent to confirm the key order details once before each write command and to ask you whether a USDT amount means notional or margin. Use demo mode to test first. github.com
Leverage changes risk on your account
The spot-margin, swap and futures leverage commands change how large a loss a position can carry. SKILL.md asks the agent to confirm the new leverage and its effect on existing positions first, and not to cancel orders or stop bots on its own when OKX suggests that as a fix. github.com
Preflight upgrades the CLI and reads your credential setup
SKILL.md tells the agent to follow the shared preflight.md before any command. It runs `okx upgrade`, which installs newer @okx_ai/okx-trade-mcp and @okx_ai/okx-trade-cli packages from npm when it finds one (checked at most every 12 hours, writing ~/.okx/last_check), then `okx config show --json` and `okx auth status --json`, which list your API-key profiles and OAuth state. github.com
Credentials live outside the chat
SKILL.md tells the agent to never accept credentials in chat and to point you to okx config init instead. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | Use demo mode (--demo or a demo profile) to place and manage orders with simulated funds instead of real money. |
|---|---|
| Talks to | OKX trading endpoints, through the okx CLI, using your API key or OAuth session |
| Sign-in and keys | The okx CLI stores an API key in ~/.okx/config.toml, or an OAuth session in its own auth-binary state, set up by okx config init or the okx-cex-auth skill. |
| Scopes |
|
Questions
What does the okx-cex-trade skill do?
It makes Claude place, cancel and amend OKX orders across spot, perpetual swap, delivery futures, options and event contracts, including take-profit, stop-loss and trailing-stop algo orders.
How do I install it?
Use the install box at the top of this page. Install the okx CLI first, then add the skill, then set up credentials with okx config init or the okx-cex-auth skill.
Does it need an OKX account?
Yes. SKILL.md says this skill requires API credentials, either an API key or an OAuth login, and a chosen trading mode before any order.
Can I test it without real money?
Yes. SKILL.md describes a demo mode with simulated trading and no real funds, selected with --demo or a demo profile.
Is it safe?
It can place real orders and move real money once you give it live-mode credentials. SKILL.md requires the trading mode to be settled before every authenticated command and appended to every response, asks the agent to confirm the key order details once before each write, and tells it to verify contract size before any derivative order. It also runs okx upgrade and lists your credential profiles in its preflight (see the safety box). Start in demo mode.
Can it short or use leverage?
Yes. Swap and futures orders take a long or short position side and a leverage command, and spot has a margin-leverage command. Leverage amplifies losses as well as gains, and SKILL.md asks the agent to confirm new leverage before applying it.
How is it different from okx-cex-bot?
This skill places individual orders. SKILL.md routes grid and DCA bot management to the sibling okx-cex-bot skill instead.
Information
updated Nov 2, 2026
- Repository
- okx/agent-skills
- Folder
skills/okx-cex-trade
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- okx-cex-trade SKILL.md · github.com
- okx/agent-skills README · github.com
- OKX CLI preflight · github.com
- okx-cex-trade spot-commands.md · github.com
- okx-cex-trade templates.md · github.com