跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 okx-cex-earn

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 f

8861 安装量

官方网址:作者主页

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

官方 description 用英文写明「Okx Cex Earn」做什么。中文介绍不改写这段原文,能力边界以文件结构与下方原文为准。

何时用

用户询问闲置资金以及是否从中赚取

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:OKX CEX Earn CLI、Preflight、Prerequisites、Credential & Profile Check、Skill Routing、Command Index。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/savings-commands.md、references/dcd-commands.md、references/onchain-commands.md、references/autoearn-commands.md、references/workflows.md,属于带资源的技能包,这些文件按需再读。

官方 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.

OKX CEX Earn CLIPreflightPrerequisitesCredential & Profile CheckSkill RoutingCommand Indexearn savings — Simple Earn (10 commands)earn dcd — Dual Investment / 双币赢 (6 commands)earn onchain — On-chain Earn (6 commands)earn auto-earn — AutoEarn / 自动赚币 (3 commands)earn flash-earn — Flash Earn / 闪赚 (1 command)Operation Flow

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
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.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 5
  • references/savings-commands.md
  • references/dcd-commands.md
  • references/onchain-commands.md
  • references/autoearn-commands.md
  • references/workflows.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「okx-cex-earn」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-b7b0ccba1b5f7561-Okx-Cex-Earn.html
请存为 .cursor/skills/okx-cex-earn/SKILL.md 或 .claude/skills/okx-cex-earn/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/okx/agent-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/okx/agent-skills' --list

npx skills add 'https://github.com/okx/agent-skills' --skill 'okx-cex-earn'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- 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/[email protected]" bins: ["okx"] label: "Install okx CLI (npm)" --- # OKX CEX Earn CLI ## Preflight 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. ## Prerequisites 1. Install `okx` CLI: ```bash npm install -g @okx_ai/okx-trade-cli ``` 2. Configure credentials: ```bash 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. --- ## 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](../_shared/preflight.md) Step 2 and remembered for the session. ```bash 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: - `config show --json` has any profile with a non-empty `api_key` field → **API Key mode**. Proceed. - No API-key profile **AND** `auth status --json` returns `"status":"logged_in"` → **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":"not_logged_in"` — **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 ` (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. --- ## Skill Routing | 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 Index ### earn savings — Simple Earn (10 commands) | 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 ` | 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`. ### earn dcd — Dual Investment / 双币赢 (6 commands) | 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 `; OAuth: no flag needed). For full command syntax, product concepts, and error codes, read `{baseDir}/references/dcd-commands.md`. ### earn onchain — On-chain Earn (6 commands) | Command | Type | Auth | Description | |---|---|---|---| | `earn onchain offers` | READ | Required | Available staking/DeFi products | | `earn onchain purchase --productId --ccy --amt` | WRITE | Required | Subscribe to on-chain product | | `earn onchain redeem --ordId --protocolType` | WRITE | Required | Redeem on-chain investment | | `earn onchain cancel --ordId --protocolType` | WRITE | Required | Cancel pending on-chain order | | `earn onchain orders` | READ | Required | Active on-chain orders | | `earn onchain history` | READ | Required | Historical on-chain orders | For full command syntax and parameters, read `{baseDir}/references/onchain-commands.md`. ### earn auto-earn — AutoEarn / 自动赚币 (3 commands) | Command | Type | Auth | Description | |---|---|---|---| | `earn auto-earn status [CCY]` | READ | Required | Query currencies supporting auto-earn and their status | | `earn auto-earn on ` | WRITE | Required | Enable auto-earn for a currency | | `earn auto-earn off ` | WRITE | Required | Disable auto-earn for a currency | > **24h restriction:** Cannot disable within 24 hours of enabling (API hard limit). Always warn user before enabling. For full command syntax, earnType inference rules, and MCP tool reference, read `{baseDir}/references/autoearn-commands.md`. ### earn flash-earn — Flash Earn / 闪赚 (1 command) | Command | Type | Auth | Description | |---|---|---|---| | `earn flash-earn projects [--status <0\|100\|0,100>]` | READ | Required | Browse Flash Earn projects by status. `0`=upcoming, `100`=in-progress, default is both | --- ## Operation Flow ### Step 0 — Credential & Profile Check Before any authenticated command: see [Credential & Profile Check](#credential--profile-check). Always use live mode silently. ### Step 1 — Identify earn intent **Simple Earn Flexible (活期):** - Query balance / history / rates → READ command, proceed directly. - Subscribe / redeem / set-rate → WRITE command, go to Step 2. **Simple Earn Fixed (定期):** - Browse available products / check quota → `earn savings fixed-products [--ccy]`. This is the dedicated tool for querying the fixed-term product pool — use it whenever the user asks about available fixed earn products, remaining quota, or APR. - Query user's existing orders → `earn savings fixed-orders [--ccy] [--state]`. - Subscribe (two-step: preview then confirm) / redeem (pending state only) → WRITE command, go to Step 2. Read `{baseDir}/references/savings-commands.md` for pre-execution checklists and confirmation templates. - For multi-step workflows (subscribe with preview, early redemption), read `{baseDir}/references/workflows.md`. **On-chain Earn:** - Query offers / orders / history → READ command, proceed directly. - Purchase / redeem / cancel → WRITE command, go to Step 2. **AutoEarn (自动赚币):** - Query auto-earn status → READ, proceed directly. - Enable / disable auto-earn → WRITE, go to Step 2. Read `{baseDir}/references/autoearn-commands.md` for confirmation templates and earnType inference. **Flash Earn (闪赚):** - Browse projects → READ, proceed directly. - Use `--status 0` for upcoming projects, `--status 100` for in-progress projects, or omit the flag to view both. When user asks to view "earn positions" or "赚币持仓" (regardless of whether they mention DCD explicitly), query all position-bearing sub-modules simultaneously (Flash Earn is query-only, no positions): ```bash okx earn savings balance --json # Simple Earn Flexible (活期) okx earn savings fixed-orders --json # Simple Earn Fixed (定期) okx earn onchain orders --json # On-chain Earn okx earn dcd orders --json # Dual Investment (双币赢) ``` Only present sections that have actual holdings. For DCD: translate state codes using the table in `{baseDir}/references/dcd-commands.md`. **Dual Investment (DCD / 双币赢):** - Browse products / pairs → READ; when user specifies a currency, read `{baseDir}/references/workflows.md` (DCD browse flow) for the mandatory parallel pre-fetch before rendering the product table - Subscribe (quote-and-buy) → WRITE → see `{baseDir}/references/workflows.md` (DCD subscribe flow) - Early redeem → WRITE → see `{baseDir}/references/workflows.md` (DCD early redeem flow) For multi-step workflows (idle fund analysis, subscribe + verify, redeem + transfer, on-chain subscribe), read `{baseDir}/references/workflows.md`. ### Step 2 — Confirm write operation For all WRITE commands, present a summary and wait for explicit confirmation. > "just do it" / "直接搞" is NOT valid confirmation — the user must see the summary first. For Simple Earn confirmation dialog format, read `{baseDir}/references/savings-commands.md`. For On-chain confirmation, read `{baseDir}/references/onchain-commands.md`. ### Step 3 — Execute and verify After any purchase, verify based on product type: - **DCD** `quote-and-buy` succeeded → run `earn dcd orders --json`, show only the matching order. - **On-chain** purchase (response contains `ordId`) → run `earn onchain orders --json`, show only the matching order. - **Simple Earn Flexible** purchase (no `ordId` in response) → run `earn savings balance --ccy --json`. - **Simple Earn Fixed** purchase → run `earn savings fixed-orders --ccy --state pending --json`, show the new order. **Simple Earn Flexible purchase:** Run in parallel — `earn savings balance --ccy ` and `earn savings rate-history --ccy --limit 1 --json`. For output format, read `{baseDir}/references/savings-commands.md`. **Simple Earn Flexible redeem:** Run `earn savings balance --ccy ` to confirm updated balance. Inform user funds returned to funding account. **Simple Earn Fixed purchase:** Run `earn savings fixed-orders --ccy --state pending --json` to confirm the order was created. Show order details including APR, term, and expected expiry date. **Simple Earn Fixed redeem:** Run `earn savings fixed-orders --json` to confirm the order state changed to `cancelled`. Inform user full principal returned to funding account — no interest earned for early cancellation. **On-chain redeem:** Query `earn onchain orders` to confirm state. Show `estSettlementTime` as estimated arrival time. **On-chain cancel:** Query `earn onchain orders` after submission: - Order gone from list → inform user: cancellation complete, funds returned to funding account. - `state: 3` (cancelling) → inform user: cancellation in progress, funds will return to funding account shortly. --- ## Global Notes - **Security:** Never ask users to paste API keys or secrets into chat. - **Output:** Always pass `--json` to list/query commands and render results as a Markdown table — never paste raw terminal output. - **Network errors:** If commands fail with a connection error, prompt user to check VPN: `curl -I https://www.okx.com` - **Language:** Always respond in the user's language. For number/time formatting and response structure conventions, read `{baseDir}/references/templates.md`.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…