okx-cex-trade

okx-cex-trade is a skill for Claude Code, Codex from okx/agent-trade-kit. It costs 278 tokens per session (7,642 once invoked), scanned A, original, MIT.

A tool for managing cryptocurrency orders and positions on the OKX exchange. It covers spot trading, derivatives such as perpetual swaps and futures, options, and event contracts with outcomes such as Yes or No.

In plain words
What is it for?
Use it to place, cancel, change, and monitor orders; manage positions and leverage; and set take-profit, stop-loss, or trailing-stop instructions.
Why use it?
It puts order and position management in the coding agent, including simulated trading for testing. It requires OKX API credentials.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to place, cancel, change, and monitor orders; manage positions and leverage; and set take-profit, stop-loss, or trailing-stop instructions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okx/agent-trade-kit/okx-cex-trade
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add okx/agent-trade-kit --skill okx-cex-trade
Clone the repo
git clone --depth 1 https://github.com/okx/agent-trade-kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for okx-cex-trade

README.md
[![agentmods](https://agentmods.dev/badge/skills/okx/agent-trade-kit/okx-cex-trade/github.svg)](https://agentmods.dev/skills/okx/agent-trade-kit/okx-cex-trade)
Your own site
<a href="https://agentmods.dev/skills/okx/agent-trade-kit/okx-cex-trade"><img src="https://agentmods.dev/badge/skills/okx/agent-trade-kit/okx-cex-trade/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for okx-cex-trade

Your own site · 80×15
<a href="https://agentmods.dev/skills/okx/agent-trade-kit/okx-cex-trade"><img src="https://agentmods.dev/badge/skills/okx/agent-trade-kit/okx-cex-trade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 278 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 392
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 415
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • low Excessive Agency · line 422
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00278 $0.07642
Opus 5 $0.00139 $0.03821
Sonnet 5 $0.00056 $0.01528
Haiku 4.5 $0.00028 $0.00764

Measured 2d ago against content hash c673b536da29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

okx-cex-trade scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Network errors**: If commands fail with a connection error, prompt user to check VPN: `curl -I https://www.okx.com`
Origin

Copies of this mod

3 near-identical copies found in the catalogue:

skills/okx-cex-trade/SKILL.md · 456 lines

How it starts

The opening of the file, as written. The whole thing — 456 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 in references/<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

  1. Install okx CLI:
    npm install -g @okx_ai/okx-trade-cli
    
  2. Configure credentials:
    okx config init   # select site -> follow browser OAuth flow
    
  3. Test with demo mode (simulated trading, no real funds):
    okx --demo spot orders
    

Security: NEVER accept credentials in chat. Guide users to okx config init for setup.

Credential & Profile Check

Run this check before any 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.

okx config show --json      # reveals API-key profiles (TOML config)
okx auth status --json      # reveals OAuth session state (auth-binary state)

Apply in this order — first match wins:

Read the full file on GitHub · 456 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed c673b536da29
  2. 5d ago Changed 93436150fceb
  3. 10d ago First seen · 456 lines · 278 tokens per session scan A bd7af03cc0aa

Subscribe to this mod's changes

okx-cex-trade is a skill published in the GitHub repository okx/agent-trade-kit (420 stars, last pushed 2d ago), licensed MIT. It adds 278 tokens to every session and 7,642 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aba-precision-protocol

FOUNDATIONAL BEHAVIORAL PROTOCOL — ABA-based precision execution rules. Every prompt processed must follow these rules. Mistakes caught late create intermittent reinforcement of wrong patterns. Stop-fix-verify before proceeding.

dcostenco/prism-coder · 48 tokens

add-export

Add a new subpath export to the @cyanheads/mcp-ts-core package. Use when creating a new public API surface that consumers import from a dedicated subpath (e.g., @cyanheads/mcp-ts-core/newutil).

cyanheads/mcp-ts-core · 50 tokens

fluent-development

This skill should be used when the user asks to "build a fluent app", "create a servicenow app in typescript", or mentions "servicenow sdk", "now-sdk", "fluent", "scoped app as code", or "pro-code development" — or when the working directory contains a now.config.json or .now.ts files.

serac-labs/serac · 77 tokens

Verification Planner

Mandates generation of testassertions.json during planning. v7.2.0 enhanced with severity gates (warn/gate/abort), dependency chains, and Claw-as-Validator support.

dcostenco/prism-coder · 44 tokens

webmcp-setup

Bootstraps webmcp-react into an existing React or Next.js app. Installs dependencies, adds WebMCPProvider, creates a first tool, and configures the MCP client bridge. Use when the user wants to set up WebMCP, add MCP tools to their app, integrate webmcp-react, or make their React app accessible to AI agents.

agentcathq/webmcp-react · 80 tokens

add-mechanic

Add game mechanics with correct GDScript 4.x patterns -- movement, health, inventory, save/load.

n24q02m/better-godot-mcp · 26 tokens