
Okx Cex Bot
This lets Claude create and manage OKX's native server-side trading bots without you needing to run anything locally. It handles both grid bots (spot and contract, including coin-margined) and DCA Martingale strategies across spot and futures markets. The skill enforces a two-step auth check before every command to distinguish between API key and OAuth modes, then applies the right flags for live versus demo trading. Notable that it never auto-transfers funds when balance is insufficient, instead it reports the shortfall and asks you to decide. Commands cover the full lifecycle: create with AI-suggested parameters, amend price ranges or take-profit levels on running bots, stop execution, and monitor P&L and individual fills.
- skills.sh installs
- 10.2K
- GitHub stars
- 200
- last updated
- Aug 21, 2026
Install
$ npx -y skills add okx/agent-skills --skill okx-cex-bot --agent claude-codeInstalls into .claude/skills of the current project.
Files
OKX CEX Bot Trading
Grid, DCA (Spot & Contract Martingale), Smart Portfolio and Recurring Buy (定投) management on OKX. All bots are native OKX server-side — they run on OKX and do not require a local process.
Preflight
Before running any command, follow ../_shared/preflight.md.
Use metadata.version from this file's frontmatter as the reference for Step 2.
Prerequisites
npm install -g @okx_ai/okx-trade-cli
okx config init # select site -> follow browser OAuth flow
Security: NEVER accept credentials in chat. Guide users to
okx config initfor setup.
Credential & Profile Check
Run before every authenticated command. The auth method is detected during preflight Step 2 and remembered for the session.
Step A — Verify credentials
Run both commands — the apiKey field from okx auth status --json is the auth-binary's internal state and is always false regardless of whether ~/.okx/config.toml has an API-key profile. okx config show --json is the only authoritative source for API-key presence.
Sponsors
Details
- Repository
- github.com/okx/agent-skills
- Categories
- Backend & APIs, DevOps & CI/CD, AI & Agent Building, Finance & Trading