okx-cex-earn

Manages OKX Simple Earn, Flash Earn, On-chain Earn, Dual Investment, and AutoEarn via the okx CLI.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/wandreandrade2018-maker/claude-config --skill okx-cex-earn-wandreandrade2018-maker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-cex-earn
Source: https://github.com/wandreandrade2018-maker/claude-config/tree/main/.agents/skills/okx-cex-earn
Command: npx skills add https://github.com/wandreandrade2018-maker/claude-config --skill okx-cex-earn-wandreandrade2018-maker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @okx_ai/okx-trade-cli, and includes references (resource) components.

What problem does it solve? Managing crypto yield products on OKX requires navigating multiple earn modules (flexible savings, fixed-term, staking, structured products) with different commands, states, and confirmation rules. This Skill provides a structured, safe workflow for querying balances, subscribing, redeeming, and monitoring all OKX earn products through the okx CLI. ## Core Features & Use Cases - Simple Earn (Flexible & Fixed): Check balances and lending rates, subscribe or redeem flexible savings, browse fixed-term products with APR and quota, and manage fixed-term orders with preview-then-confirm flows. - Dual Investment (DCD / 双币赢): Browse CALL/PUT structured products with live spot price comparison, execute atomic quote-and-buy subscriptions, and perform two-phase early redemption. - On-chain Earn, Flash Earn & AutoEarn: Subscribe to staking/DeFi products with risk disclaimers, monitor flash earn projects, and toggle auto-earn with 24-hour lock warnings. - Use Case: A user asks "how much idle USDT can I put into earn?" The Skill checks funding and trading account balances, current lending rates, and fixed-term offers in parallel, then presents a comparison table and walks the user through a confirmed subscription with post-trade verification. ## Quick Start Ask the assistant to check your OKX earn balances and show current USDT lending rates using the okx-cex-earn skill.

Frequently Asked Questions about okx-cex-earn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I subscribe to OKX Simple Earn with the okx CLI?

Run okx earn savings purchase with --ccy and --amt flags, optionally setting a minimum lending rate with --rate. The Skill first checks your funding account balance and current lendingRate, shows a confirmation summary, and only executes after explicit approval.

How do I check my OKX earn positions across all products?

Query all position-bearing modules in parallel: earn savings balance for flexible, earn savings fixed-orders for fixed-term, earn onchain orders for staking, and earn dcd orders for dual investment. Only sections with actual holdings are displayed.

Does OKX Dual Investment support early redemption?

Yes, via earn dcd redeem-execute, which fetches a fresh quote and executes atomically. Redemption is only possible within the order's redeemStartTime to redeemEndTime window; orders without these fields do not support early exit.

Why can't I disable OKX AutoEarn right after enabling it?

OKX enforces a 24-hour lock: auto-earn cannot be disabled within 24 hours of enabling. If you hit this error, the Skill parses the unlock timestamp from the error message and tells you exactly when to retry.

Can I use OKX earn products in demo mode?

No. OKX Earn and DCD do not support demo or simulated trading mode. All earn commands run in live mode, using --profile with a live API-key profile or default OAuth session.

What happens if a DCD order request returns a 504 timeout?

Never retry write operations after a 504 gateway timeout, since the server may have executed the request. Instead, query earn dcd orders first to verify whether the order was actually created before taking further action.