PlugWiki

okx-cex-earn Skill for Claude: Manage OKX Earn With the okx CLI

Makes Claude manage your OKX Earn products with the okx CLI: balances, subscriptions, redemptions and rates.

Installs
9.3K
on skills.sh
Stars
200
on GitHub
Files
7
besides SKILL.md
Updated
Oct 2026
last repo commit

This skill is published by OKX in its own agent-skills repo. It makes Claude run the okx command line tool to work with five kinds of OKX Earn products: Simple Earn (flexible and fixed-term), Flash Earn, on-chain Earn (staking and DeFi), Dual Investment and AutoEarn. Claude can check balances, browse products, subscribe, redeem and set lending rates.

It moves real money. OKX Earn has no demo mode, and SKILL.md says every write command needs a summary and your explicit confirmation first. You need the okx CLI and a signed-in OKX account, through OAuth or an API key profile. Never paste credentials into the chat.

Good for

  • OKX users who want to see all their Earn positions in one reply
  • People who subscribe to savings, staking or Dual Investment products and want confirmation steps
  • Claude Code, Cursor, Windsurf and Codex CLI users who run the okx CLI

Install okx-cex-earn

Claude Code

  1. 1

    Copy this prompt.

    Install the okx-cex-earn 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. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

Run both steps. Then sign in with okx config init (API key) or by asking Claude to use the okx-cex-auth skill (OAuth), as the README describes. SKILL.md's first step reads ../_shared/preflight.md, a file outside the okx-cex-earn folder (skills/_shared/ in the repo). The okx-cex-auth skill is what SKILL.md loads when you are not signed in.

From the project README. Source.

What's in the skill

When it loads

Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI. Use this skill whenever the user wants to check earn balances, browse flash-earn projects, subscribe or redeem earn products, view or set lending rates, monitor on-chain staking orders, interact with dual investment structured products, or manage auto-earn — even if phrased casually as 活期赚币, 定期赚币, 闪赚, 赚币, 申购, 赎回, 链上赚币, 质押, 理财, 双币赢, 双币理财, 双币申购, 高卖, 低买, dual investment, DCD, flash earn, buy low, sell high structured product, earn with target price, 目标价, 自动赚币, auto earn, auto-earn, 自动借出, 自动质押, auto lend, auto staking, USDG earn, USDG 赚币, 闲置资金自动理财, fixed earn, fixed deposit, term deposit, 定期理财, 定期. Also use when the user asks about idle funds and whether to earn on them.

Sections in SKILL.md

  1. Preflight
  2. Prerequisites
  3. Credential & Profile Check
  4. Skill Routing
  5. Command Index
  6. earn savings — Simple Earn (10 commands)
  7. earn dcd — Dual Investment / 双币赢 (6 commands)
  8. earn onchain — On-chain Earn (6 commands)
  9. earn auto-earn — AutoEarn / 自动赚币 (3 commands)
  10. earn flash-earn — Flash Earn / 闪赚 (1 command)
  11. Operation Flow
  12. Step 0 — Credential & Profile Check
  13. Step 1 — Identify earn intent
  14. Step 2 — Confirm write operation
  15. Step 3 — Execute and verify
  16. Global Notes

Key facts

Installs on skills.sh
9,344 (Nov 2, 2026)
GitHub stars
200 (Nov 2, 2026)
Last repo commit
Oct 28, 2026

What it includes

  • Simple Earn: balance, purchase, redeem, set-rate, history and 4 fixed-term commands

    10 commands. purchase, redeem, set-rate, fixed-purchase and fixed-redeem write. fixed-purchase without --confirm only previews. Only pending fixed orders can be redeemed early, and early redemption earns no interest.

    Write · earn savings

  • Dual Investment: pairs, products, quote-and-buy, orders and early redemption

    6 commands. quote-and-buy quotes and subscribes in one step. redeem-execute is a two-step early redemption: preview, then execute.

    Write · earn dcd

  • On-chain Earn: offers, purchase, redeem, cancel, orders and history

    6 commands for staking and DeFi products. purchase, redeem and cancel write.

    Write · earn onchain

  • AutoEarn: check status, turn on or off per currency

    3 commands. You cannot turn auto-earn off within 24 hours of turning it on, and Claude is told to warn you before enabling.

    Write · earn auto-earn

  • Flash Earn: browse upcoming and in-progress projects (read only)

    1 command. --status 0 is upcoming, 100 is in progress, and the default shows both.

    Network · earn flash-earn

  • Runs okx upgrade, config show, auth status and a version check before the first command

    Defined in ../_shared/preflight.md. okx upgrade may install a newer okx CLI and MCP package from npm and updates ~/.okx/last_check.

    Runs code · Preflight

  • Shows a summary and waits for explicit confirmation; "just do it" does not count

    After each purchase it re-reads orders or balance to confirm and shows the matching order.

    Confirm writes

  • Reads savings, fixed-term, on-chain and Dual Investment holdings together

    Asked for earn positions, it runs four read commands in parallel and shows only sections that hold something.

    Read · Earn positions overview

From the official docs

Permissions

High risk

It can subscribe to and redeem real Earn products on your OKX account, and some actions cannot be undone for 24 hours. Use a key limited to what you need and read each confirmation before you approve.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can move real money on your OKX account

    Subscribe, redeem, cancel, set-rate and auto-earn commands change your own OKX account and use its real funds. OKX Earn has no demo mode, and SKILL.md tells the agent to use live mode silently and not mention it unless there is an error. dcd quote-and-buy quotes and subscribes in one step. SKILL.md asks for a summary and explicit confirmation before each write, and says "just do it" is not valid confirmation, but you still need to read each summary. github.com

  • Some actions are hard to reverse

    Auto-earn cannot be turned off for 24 hours after it is turned on (SKILL.md calls it an API hard limit). Only pending fixed-term orders can be redeemed early, and early redemption returns the full principal with no interest. 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). SKILL.md then has the agent run `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 never to accept credentials in chat and to point you to okx config init instead. github.com

  • The sign-in companion can install or remove a helper binary

    okx-cex-auth, which this skill loads when you are not signed in, also covers installing, updating and removing the okx-auth binary (okx auth install, okx auth remove). github.com

Technical details
Talks towww.okx.com (my.okx.com, app.okx.com or tr.okx.com by site). npm registry (okx upgrade and CLI install)
Sign-in and keysOAuth sign-in through the okx CLI, or an API key profile in ~/.okx/config.toml; SKILL.md says never to accept credentials in chat.
Scopes
  • Reads your Earn balances, orders, rates and products on your OKX account

  • Can subscribe to, redeem and cancel Earn products and set lending rates with real funds

  • Can turn AutoEarn on or off per currency

  • Runs the okx CLI, and okx upgrade through the shared preflight

Questions

What does okx-cex-earn do?

It makes Claude run the okx CLI to manage OKX Earn: Simple Earn (flexible and fixed-term), Flash Earn, on-chain staking, Dual Investment and AutoEarn. Claude can check balances, browse products, subscribe, redeem and set lending rates.

How do I install it in Claude Code?

Use the install box at the top. It has two steps: install the okx CLI from npm, then add the skill and its sign-in companion okx-cex-auth with the skills CLI.

Does it need an OKX API key?

You need to be signed in one of two ways: OAuth through the okx-cex-auth skill, or an API key profile created with okx config init. SKILL.md says never to paste credentials into the chat.

Can it move my money without asking?

SKILL.md says every write command needs a summary and your explicit confirmation, and that "just do it" is not valid confirmation. It still acts on your real account, so read each summary. There is no demo mode for Earn.

Which OKX sites does it work with?

The sign-in skill lists four: Global (www.okx.com), EEA (my.okx.com), US (app.okx.com) and TR (tr.okx.com). You choose one when you sign in with OAuth.

Is it made by OKX?

Yes. It sits in the okx/agent-skills repo, and the metadata names okx as author.

How is it different from okx-cex-trade or okx-cex-portfolio?

Its routing table sends spot, swap, futures and options orders to okx-cex-trade, and balances, positions and transfers to okx-cex-portfolio. This skill handles Earn products only.

Does it work in the Claude app?

The README names Claude Code, Cursor, Windsurf and Codex CLI. The skill needs the okx CLI installed on your machine, so use one of those clients.

Is it safe?

The folder holds markdown only, but Claude runs the okx CLI against your real OKX account, and the shared preflight can upgrade the CLI from npm. Writes need your confirmation, yet some are hard to undo: auto-earn cannot be turned off for 24 hours. Use a key with only the access you need.

Information

updated Nov 2, 2026

Folder
skills/okx-cex-earn

okx/agent-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. SKILL.md · github.com
  2. README · github.com
  3. preflight.md · github.com
  4. okx-cex-auth SKILL.md · github.com

Updated Nov 2, 2026.