
Okx Cex Earn
Safely query, enable, and disable OKX AutoEarn (auto-lend and auto-stake) for idle spot balances from the OKX CLI with JSON status checks and explicit user confirmation before live changes.
Overview
okx-cex-earn is an agent skill for the Operate phase that guides OKX CLI AutoEarn status, enable, and disable flows with JSON pre-checks and mandatory user confirmation before live account changes.
Install
npx skills add https://github.com/okx/agent-skills --skill okx-cex-earnWhat is this skill?
- Three command surfaces: earn auto-earn status, on, and off with --profile live and optional --json
- Status output covers ccy, earnType (lend+stake or USDG earn), autoLend, autoStaking, invested, matched, and apr
- CLI infers earnType on enable—no manual earn-type argument when turning AutoEarn on
- Pre-execution checklist: JSON status, confirmation template, 24-hour disable warning, then wait for user approval
- Disable fails if AutoEarn was enabled less than 24 hours ago
- Three documented command groups: status, on, and off
- 24-hour restriction before AutoEarn can be disabled after enable
- Status exposes seven fields: ccy, earnType, autoLend, autoStaking, invested, matched, apr
Adoption & trust: 6.2k installs on skills.sh; 134 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You hold idle crypto on OKX and want AutoEarn on or off, but you need the exact CLI commands, field meanings, and safety gates so an agent does not flip live yield settings blindly.
Who is it for?
Solo builders with an OKX live CLI profile who want agent-guided AutoEarn checks and toggles with human-in-the-loop confirmation.
Skip if: Unattended bots that enable or disable earn without user sign-off, users without OKX CLI and live API access, or anyone trying to disable AutoEarn within 24 hours of enabling it.
When should I use this skill?
You are managing OKX AutoEarn via the OKX CLI (status, enable, or disable) and need checklist-driven, user-confirmed live operations.
What do I get? / Deliverables
You get verified JSON status for supported currencies, a clear confirmation summary with the 24-hour lock explained, and successful on/off commands only after you approve the change.
- JSON AutoEarn status report for one or all supported currencies
- User-facing confirmation summary before enable or disable
- Executed auto-earn on or off command after explicit approval
Recommended Skills
Journey fit
AutoEarn toggles affect a live exchange account and idle treasury yield, which fits running and adjusting production financial operations rather than product build or launch work. Enabling or disabling earn modes is an iterative ops change on an already-funded OKX profile, including pre-flight status checks and honoring the 24-hour disable lock.
How it compares
OKX-specific AutoEarn CLI reference with confirmation gates—not a generic DeFi yield aggregator skill or an MCP market-data server.
Common Questions / FAQ
Who is okx-cex-earn for?
It is for indie builders and operators who use the OKX CLI with a live profile and want procedural help managing AutoEarn for supported spot currencies.
When should I use okx-cex-earn?
Use it in Operate when you need to list which ccys support AutoEarn, inspect apr and invested amounts via --json, enable lend+stake or USDG earn, or plan a disable after the 24-hour window.
Is okx-cex-earn safe to install?
Treat it as live-financial guidance: review the Security Audits panel on this Prism page, restrict API permissions, and keep the skill’s user-confirmation step before any on or off command.
SKILL.md
READMESKILL.md - Okx Cex Earn
# AutoEarn (自动赚币) Command Reference ## earn auto-earn status Query currencies that support auto-earn and their current status. ```bash okx --profile live earn auto-earn status # all currencies okx --profile live earn auto-earn status USDT # specific currency okx --profile live earn auto-earn status --ccy USDT # --ccy flag form okx --profile live earn auto-earn status --json ``` Output fields: `ccy` · `earnType` (lend+stake or USDG earn) · `autoLend` (status) · `autoStaking` (status) · `invested` (amount in earn) · `matched` (matched amount) · `apr` (annual rate) --- ## earn auto-earn on Enable auto-earn for a currency. CLI auto-infers earnType — no manual input needed. ```bash okx --profile live earn auto-earn on USDT okx --profile live earn auto-earn on --ccy USDT okx --profile live earn auto-earn on USDG ``` | Parameter | Required | Description | |---|---|---| | `CCY` (positional) or `--ccy` | Yes | Currency, e.g. USDT, SOL, USDG | **Pre-execution checklist:** 1. `okx --profile live earn auto-earn status <ccy> --json` — verify currency supports auto-earn and is not already enabled 2. Show confirmation summary (see [Confirmation Templates](#confirmation-templates)) 3. **Warn about 24h restriction** — once enabled, cannot disable for 24 hours 4. Wait for user confirmation --- ## earn auto-earn off Disable auto-earn for a currency. **Will fail if enabled less than 24 hours ago.** ```bash okx --profile live earn auto-earn off USDT okx --profile live earn auto-earn off --ccy USDT ``` | Parameter | Required | Description | |---|---|---| | `CCY` (positional) or `--ccy` | Yes | Currency to disable | **Pre-execution checklist:** 1. `okx --profile live earn auto-earn status <ccy> --json` — verify auto-earn is currently enabled 2. Show confirmation summary 3. Mention 24h restriction — if user just recently enabled, the operation may fail 4. Wait for user confirmation **On 24h restriction error:** Parse the error message for the unlock timestamp. Tell the user when they can retry. --- ## earnType Inference Rules The CLI auto-infers earnType. When using the MCP tool `earn_auto_set` directly, the caller must determine earnType: 1. Call `account_get_balance` for the currency 2. Check `autoLendStatus` and `autoStakingStatus` in the balance details: - Currency is USDG or BUIDL → `earnType = "1"` (USDG earn) - Otherwise, either is NOT `"unsupported"` → `earnType = "0"` (auto-lend+stake) - Neither condition met → currency does not support auto-earn **Invested amount field difference:** - `earnType = "0"` (normal currencies): read `autoLendAmt` field - `earnType = "1"` (USDG/BUIDL): read `eq` (equity) field --- ## MCP Tool Reference | CLI Command | MCP Tool | Parameters | |---|---|---| | `earn auto-earn status` | `account_get_balance` | `ccy` (optional) — filter by `autoLendStatus`/`autoStakingStatus` | | `earn auto-earn on <CCY>` | `earn_auto_set` | `ccy`, `action: "turn_on"`, `earnType` | | `earn auto-earn off <CCY>` | `earn_auto_set` | `ccy`, `action: "turn_off"`, `earnType` | --- ## Confirmation Templates Respond in the user's language. Below are the required data points — adapt phrasing to match the conversation language. ### Enable auto-earn Present before executing `earn auto-earn on`: - **Currency**: {ccy} - **Type**: {earnTypeLabel} (auto-lend+stake / USDG earn) - **Effect**: idle {ccy} will automatically participate in lending/staking - **⚠️ 24h lock**: cannot disable within 24 hours of enabling Wait for explicit confirmation. ### Disable auto-earn Present before executing `earn auto-earn off`: - **Currency**: {ccy} - **Type**: {earnTypeLabel} - **⚠️ 24h restriction**: if enabled less than 24 hours ago, this will fail Wait for explicit confirmation. # DCD Command Reference ## Product Concepts ### Direction | optType | 中文 | User deposits | Triggered when | If triggered | |---|---|---|---|---| | C | 高卖 | baseCcy (e.g. BTC) | expiry price ≥ strike | principal + yi