earn-hunter
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push…
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
$ npx -y skills add okx/agent-skills --skill okx-cex-earn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/okx-cex-earnContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: okx-cex-earn
description: "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."
license: MIT
metadata:
author: okx
version: "1.4.8"
homepage: "https://www.okx.com"
agent:
requires:
bins: ["okx"]
install:
- id: npm
kind: node
package: "@okx_ai/okx-trade-cli@1.4.8"
bins: ["okx"]
label: "Install okx CLI (npm)"Before running any command, follow [`../_shared/preflight.md`](../_shared/preflight.md). Use `metadata.version` from this file's frontmatter as the reference for Step 2.
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. Verify: `okx earn savings balance`
> **Security**: NEVER accept credentials in chat. Guide users to `okx config init` for setup.
---
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](../_shared/preflight.md) Step 2 and remembered for the session.
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:
OKX Earn does not support demo mode. Always use live mode silently — don't mention it unless there's an error.
**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.
---
| User intent | Route to skill | |---|---| | Market prices, tickers, candles | `okx-cex-market` | | Spot / swap / futures / options orders | `okx-cex-trade` | | Account balance, positions, transfers | `okx-cex-portfolio` | | Grid / DCA trading bots | `okx-cex-bot` | | Simple Earn, Flash Earn, On-chain Earn, Dual Investment (双币赢), or AutoEarn (自动赚币) | **This skill** |
---
| Command | Type | Auth | Description | |---|---|---|---| | `earn savings balance [ccy]` | READ | Required | Savings balance (all or specific currency). Also fetch fixed-term orders for a complete picture. | | `earn savings purchase --ccy --amt [--rate]` | WRITE | Required | Subscribe funds to Simple Earn (活期) | | `earn savings redeem --ccy --amt` | WRITE | Required | Redeem funds from Simple Earn (活期) | | `earn savings set-rate --ccy --rate` | WRITE | Required | Set minimum lending rate | | `earn savings lending-history` | READ | Required | User's personal lending records with earnings detail | | `earn savings rate-history` | READ | Required | Simple Earn lending rates and fixed-term offers (require auth) | | `earn savings fixed-products [--ccy]` | READ | Required | Browse available fixed-term (定期) products with APR, term, remaining quota, and sold-out status | | `earn savings fixed-orders [--ccy] [--state]` | READ | Required | Query fixed-term (定期) orders. States: pending/earning/expired/settled/cancelled | | `earn savings fixed-purchase --ccy --amt --term [--confirm]` | WRITE | Required | Subscribe to Simple Earn Fixed (定期). Without `--confirm`: preview only | | `earn savings fixed-redeem --reqId <reqId>` | WRITE | Required | Redeem a fixed-term order (full amount). Only `pending` state orders can be redeemed early |
For full command syntax, rate field semantics, and confirmation templates, read `{baseDir}/references/savings-commands.md`.
| Command | Type | Auth | Description | |---|---|---|---| | `earn dcd pairs` | READ | Required | Available DCD currency pairs | | `earn dcd products` | READ | Required | Active products with filters | | `earn dcd quote-and-buy --productId --sz --notionalCcy` | WRITE | Required | Atomic subscribe: quote + execute in one step | | `earn dcd order --ordId` | READ | Required | Quick state check for a single order | | `earn dcd orders` | READ | Required | Full order list / history | | `earn dcd redeem-execute --ordId` | WRITE | Required | Two-step early redemption: preview then execute |
> DCD does **not** support demo/simulated trading mode. Always use live mode (API Key: `--profile <live-profile>`; OAuth: no flag needed).
For full command syntax, prod
A collection of AI agent skills for OKX exchange operations. Each skill is a self-contained Markdown file with YAML frontmatter that tells an AI agent when to activate and how to execute tasks via the okx CLI.
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push…
Use this skill when the user wants to 'login/log in/sign in', 'authenticate', 'authorize',…
Manage Grid bots (spot/contract/coin-margined) and DCA Martingale bots (Spot DCA 现货马丁 /…
Use this skill when the user asks for: price of any asset, ticker, order book, candles,…
This skill should be used when the user asks about 'account balance', 'how much USDT do I…
Use this skill when the user asks to: 'find a trading skill', 'search for skills', 'install a…