Agent skill · marketing growth · okx

okx-cex-bot

Manage Grid bots (spot/contract/coin-margined) and DCA Martingale bots (Spot DCA 现货马丁 / Contract DCA 合约马丁) on OKX. Covers create, stop, amend, monitor P&L, TP/SL, margin/investment adjustment, and AI-recommended parameters. Requires API credentials. Not for regular orders (okx-cex-trade), market data (okx-cex-market), or account info (okx-cex-portfolio).

Why this skill is useful

Adds executable commands for managing Grid and DCA bots on OKX, which are not available in public documentation.

What it needs

Requires npm installed locally. Requires okx account access. About 13k tokens when loaded. Last updated 2026-07-22. 160 stars on the source repository.

What this skill does

OKX CEX Bot Trading Grid and DCA (Spot & Contract Martingale) bot 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 Security: NEVER accept credentials in chat. Guide users to okx config init for 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. Apply in this order — first match wins: config show --json has any profile with a non-empty apikey field → API Key mode. Proceed to Step B. No API-key profile AND auth status --json returns "status":"loggedin" → OAuth mode. Proceed to Step B. No API-key profile AND "status":"pending" — login is in progress, wait for it to complete. No API-key profile AND "status":"notloggedin" — stop, load okx-cex-auth skill and follow login steps, wait for completion. Step B — Confirm trading mode Resolution: 1. User intent is clear ("real"/"实盘"/"live" → live; "test"/"模拟"/"demo" → demo) → use it, inform user 2. No explicit declaration → check conversation context for previous choice → reuse if found 3. Nothing found → ask: "Live (实盘) or Demo (模拟盘)?" — wait before proceeding How to apply the mode depends on auth method (detected in Step A): Auth method Live (实盘) Demo (模拟盘) --- --- --- API Key --profile <live-profile> --profile <demo-profile> OAuth (no flag needed, live is default) --demo API Key users: run okx config show --json to discover available profile names and their demo settings. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills okx/okx-cex-bot

View the source on GitHub

Browse the @skills marketplace