Agent skill · marketing growth · okx

okx-cex-earn

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.

Why this skill is useful

Adds executable commands for managing various OKX earn products that aren't available in public documentation.

What it needs

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

What this skill does

OKX CEX Earn CLI 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: 2. Configure credentials: 3. Verify: okx earn savings balance Security: NEVER accept credentials in chat. Guide users to okx config init for setup. --- Credential & Profile Check Run both commands before any authenticated command — 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. The auth method is detected during preflight Step 2 and remembered for the session. Apply in this order — first match wins: config show --json has any profile with a non-empty apikey field → API Key mode. Proceed. No API-key profile AND auth status --json returns "status":"loggedin" → OAuth mode. Proceed. 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. OKX Earn does not support demo mode. Always use live mode silently — don't mention it unless there's an error. API Key users: use --profile <live-profile> (the profile without demo=true). OAuth users: no flag needed (live is the default). On authentication errors (401 / "Session expired" / "Run okx auth login first"): stop immediately, load okx-cex-auth skill and follow re-authentication steps, then retry. …

How to use it

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

@skills okx/okx-cex-earn

View the source on GitHub

Browse the @skills marketplace