okx-cex-earn

okx/agent-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/okx/agent-skills --skill okx-cex-earn
0 commentsdiscussion
summary

Before running any command, follow ../_shared/preflight.md.

  • Use metadata.version from this file's frontmatter as the reference for Step 2.
skill.md

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:
    npm install -g @okx_ai/okx-trade-cli
    
  2. Configure credentials:
    okx config add-profile AK=<your_api_key> SK=<your_secret_key> PP=<your_passphrase> name=live
    # or interactive wizard:
    okx config init
    
  3. Verify: okx --profile live earn savings balance

Credential & Profile Check

Run okx config show before any authenticated command.

  • Error or no configuration → stop, guide user to run okx config init, wait for completion.
  • Credentials configured → proceed.

OKX Earn does not support demo mode. Always use --profile live silently — don't mention it unless there's an error.

On 401 errors: stop immediately, tell the user their credentials may be invalid or expired, guide them to update ~/.okx/config.toml (do NOT ask them to paste credentials into chat), then verify with okx config show and 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, On-chain Earn, Dual Investment (双币赢), or AutoEarn (自动赚币) This skill

Command Index

earn savings — Simple Earn (6 commands)

Command Type Auth Description
earn savings balance [ccy] READ Required Savings balance (all or specific currency)
earn savings purchase --ccy --amt 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 Public Simple Earn lending rates (简单赚币利率)

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 --profile live.

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 <CCY> WRITE Required Enable auto-earn for a currency
earn auto-earn off <CCY> 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.


Operation Flow

Step 0 — Credential & Profile Check

Before any authenticated command: see Credential & Profile Check. Always use --profile live silently.

Step 1 — Identify earn intent

Simple Earn / On-chain Earn:

  • Query balance / history / rates → READ command, proceed directly.
  • Subscribe / redeem / set-rate / on-chain purchase → 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.

When user asks to view "earn positions" or "赚币持仓" (regardless of whether they mention DCD explicitly), query all three simultaneously:

okx --profile live earn savings balance --json    # Simple Earn
okx --profile live earn onchain orders --json     # On-chain Earn
okx --profile live 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 purchase (no ordId in response) → run earn savings balance --ccy <ccy> --json.

Simple Earn purchase: Run in parallel — earn savings balance --ccy <ccy> and earn savings rate-history --ccy <ccy> --limit 1 --json. For output format, read {baseDir}/references/savings-commands.md.

Simple Earn redeem: Run earn savings balance --ccy <ccy> to confirm updated balance. Inform user funds returned to funding account.

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.

how to use okx-cex-earn

How to use okx-cex-earn on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add okx-cex-earn
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches okx-cex-earn from GitHub repository okx/agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/okx-cex-earn

Reload or restart Cursor to activate okx-cex-earn. Access the skill through slash commands (e.g., /okx-cex-earn) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.448 reviews
  • Layla Okafor· Dec 20, 2024

    Solid pick for teams standardizing on skills: okx-cex-earn is focused, and the summary matches what you get after install.

  • Chen Diallo· Dec 16, 2024

    We added okx-cex-earn from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Dhruvi Jain· Dec 8, 2024

    Keeps context tight: okx-cex-earn is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Olivia Taylor· Dec 4, 2024

    Keeps context tight: okx-cex-earn is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Oshnikdeep· Nov 27, 2024

    okx-cex-earn has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Rahul Santra· Nov 23, 2024

    I recommend okx-cex-earn for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Ama Choi· Nov 23, 2024

    okx-cex-earn has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Chen Thomas· Nov 19, 2024

    I recommend okx-cex-earn for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Kwame Okafor· Nov 11, 2024

    okx-cex-earn is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chen Ghosh· Nov 7, 2024

    okx-cex-earn reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 48

1 / 5