
Okx Cex Trade
If you're building a trading bot or automation that needs to execute on OKX, this handles the order lifecycle across spot, perps, futures, options, and their newer event contracts (binary outcome prediction markets). It wraps the OKX trade CLI with proper credential handling for both OAuth and API key flows, demo/live mode switching, and the tricky bits like contract face value lookup before sizing derivative orders. The documentation is thorough about not guessing USDT amounts (notional vs margin cost) and routing correctly between the four OKX skills. Worth noting it won't fetch prices or check your balance, those live in separate skills, so you'll typically chain this with okx-cex-market or okx-cex-portfolio for real workflows.
- skills.sh installs
- 10.6K
- GitHub stars
- 200
- last updated
- Aug 21, 2026
Install
$ npx -y skills add okx/agent-skills --skill okx-cex-trade --agent claude-codeInstalls into .claude/skills of the current project.
Files
OKX CEX Trading CLI
Spot, perpetual swap, delivery futures, options, and event contract order management on OKX exchange. Place, cancel, amend, and monitor orders; query option chains and Greeks; trade binary outcome event contracts (Yes/No, Up/Down); set take-profit/stop-loss and trailing stops; manage leverage and positions. Requires API credentials.
CLI vs MCP tool names — Subcommands use spaces (
okx swap algo place,okx bot grid create), not hyphens. Do NOT convert an MCP tool identifier (swap_place_algo_order) into a hyphen-joined CLI command (okx swap place-algo) — that will be rejected with "Unknown command". Per-module mapping tables live inreferences/<module>-commands.md.
Preflight
Before running any command, follow ../_shared/preflight.md.
Use metadata.version from this file's frontmatter as the reference for Step 2.
Prerequisites
Sponsors
Details
- Repository
- github.com/okx/agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Sales & Marketing, Finance & Trading