okx-defi

โดย okx

OKX-รวมศูนย์ DeFi (ไม่ระบุ DApp เฉพาะ) — การค้นหาผลิตภัณฑ์ การดำเนินการฝาก/ถอน/รับสิทธิ์ และการดูสถานะ **หากผู้ใช้ระบุโปรโตคอล/DApp ของบุคคลที่สาม (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, …) ให้เปลี่ยนเส้นทางไปที่ okx-dapp-discovery — ไม่ใช่ที่นี่ แม้แต่ 'แสดงสถานะ Aave ของฉัน'** ทริกเกอร์การลงทุน: 'ลงทุนใน DeFi', 'รับผลตอบแทน', 'หา APY ที่ดีที่สุด', 'ฝาก/วางเดิมพันเพื่อรับผลตอบแทน', 'ค้นหาผลิตภัณฑ์ DeFi',...

npx skills add https://github.com/okx/onchainos-skills --skill okx-defi

OKX DeFi

Discover and manage multi-chain, OKX-aggregated DeFi products and positions through the onchainos defi CLI group.

Preflight

Preflight checks: At the start of each thread, complete the checks in ../okx-agentic-wallet/_shared/preflight.md. If missing, read _shared/preflight.md.

Intent Routing

Load only the reference files required by the selected route.

User IntentReference
Discover / search DeFi products, find best APYinvest.md
Product detail (APY, TVL, accepted tokens)invest.md
Deposit / stake / provide liquidityinvest.md
Withdraw / redeem a position (full or partial)invest.md
Claim rewards (platform / investment / V3 fee / bonus / unlocked principal)invest.md
APY history, TVL history, V3 depth / price chartsinvest.md
View DeFi positions / holdings overviewportfolio.md
Per-protocol position detailportfolio.md
Exact parameters / return schemas — invest, shared support, and charts commandsinvest-cli-reference.md
Exact parameters / return schemas — positions commandsportfolio-cli-reference.md
Errors / failed deposits / expired calldatainvest-troubleshooting.md
Errors / empty positions / address-format issuesportfolio-troubleshooting.md

Typical flow spans both: view positions (Portfolio) → redeem or claim (Invest). Read both reference files when the request chains them.

Route a named third-party DApp request—including protocol-specific APY, TVL, volume, history, or timeframe analysis—to okx-dapp-discovery. Generic cross-protocol yield/APY/TVL and V3-liquidity analysis stays here. Route token search/price/chart requests to okx-dex-market, and spot swaps, wallet balances, login, contract calls, or transaction broadcasts to okx-agentic-wallet.

Chain Name Support

The CLI resolves chain names automatically (for example, ethereum → 1, bsc → 56, solana → 501). Use the Chain Support table in portfolio.md for the DeFi-specific aliases.

Security

Address Resolution

When the user does NOT provide a wallet address, resolve it automatically from the Agentic Wallet before running any defi command:

1. onchainos wallet status          → check if logged in, get active account
2. onchainos wallet addresses       → get addresses grouped by chain category:
                                       - XLayer addresses
                                       - EVM addresses (Ethereum, BSC, Polygon, etc.)
                                       - Solana addresses
3. Match address to target chain:
   - EVM chains → use EVM address
   - Solana     → use Solana address
   - XLayer     → use XLayer address

Rules:

  • If the user provides an explicit address, use it directly — skip this step
  • If wallet is not logged in, ask the user to log in first (→ okx-agentic-wallet) or provide an address manually
  • If the user says "check all accounts" or "all wallets", use wallet balance --all to get all account IDs, then wallet switch <id> + wallet addresses for each account
  • Always confirm the resolved address with the user before proceeding if the account has multiple addresses of the same type

Address-Chain Compatibility

The --address and chain parameters must be compatible. EVM addresses (0x…) can only query EVM chains; Solana addresses (base58) can only query solana. Never mix them — the API will return error 84019 (Address format error).

  • 0x… address → only pass EVM chains: ethereum,bsc,polygon,arbitrum,base,xlayer,avalanche,optimism,fantom,linea,scroll,zksync
  • base58 address → only pass solana
  • Sui address → only pass sui; Tron address (T…) → only pass tron; TON address → only pass ton
  • If the user wants positions across both EVM and Solana, make two separate calls with the respective addresses

Global Notes

  • The wallet address parameter for ALL defi commands is --address
  • defi positions uses --chains (plural, comma-separated); defi position-detail uses --chain (singular)
  • Before reporting completion, verify the selected command succeeded, apply the output format and safety checks from its routed reference, and report any partial or failed on-chain step explicitly.

Skills เพิ่มเติมจาก okx

okx-agent-chat
okx
Routing stub — any a2a-agent-chat envelope / agent-task system message is handled by `okx-agent-task`. For missing or uninitialized OKX A2A communication runtime/plugin, read `skills/okx-agent-chat/ensure-okx-a2a-communication-ready.md`.
developmentapicommunication
okx-agentic-wallet
okx
แหล่งข้อมูลที่เชื่อถือได้สำหรับ OKX Agentic Wallet และฟีเจอร์ Gas Station Gas Station คือฟีเจอร์แก๊สด้วย stablecoin ของ OKX บน Solana ผ่าน Relayer ของบุคคลที่สาม รองรับเฉพาะ Solana ไม่มี EIP-7702 ต้องเรียกใช้สำหรับคำถามเกี่ยวกับ Gas Station (คืออะไร / ทำงานอย่างไร / โทเค็นที่รองรับ / ค่าธรรมเนียม / เปิดหรือปิด Gas Station / เปลี่ยนโทเค็นแก๊สเริ่มต้น / ความเข้ากันได้กับ Jito Bundler) และการดำเนินการใดๆ ในกระเป๋าเงิน: เข้าสู่ระบบ, ยืนยัน OTP, เพิ่ม/สลับ/สถานะ/ออกจากระบบบัญชี, ยอดคงเหลือ, สินทรัพย์, การถือครอง, ที่อยู่, ฝาก/รับ/เติมเงิน,...
apiweb-scrapingdevelopment
okx-agent-identity
okx
ERC-8004 บนเชน Agent identity บน XLayer: ลงทะเบียน / สร้าง / อัปเดต / เปิดใช้งาน / ปิดใช้งาน / ค้นหา agent; ดูคะแนน; รายการบริการ agent; ตั้งค่ารูป avatar. บทบาท: user (User / User Agent / Buyer / Client / 用户 / 买家 / 买方), asp
developmentapi
okx-agent-payments-protocol
okx
ใช้เมื่อเอเจนต์พบ HTTP 402 / payment-required หรือผู้ใช้กล่าวถึง x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, ช่องทางการชำระเงิน / voucher / session, channelId / channel_id, การเปิด / ปิด / เติมเงิน / ชำระบัญชี / คืนเงินช่องทาง, paymentId หรือลิงก์ a2a_, การสร้าง / ตรวจสอบลิงก์ชำระเงิน, A2MCP / ปลายทาง A2MCP, หรือการส่งคำขอ / เรียกปลายทางของเอเจนต์พร้อมปลายทางที่เป็นรูปธรรม...
okx-agent-task
okx
ต้องเปิดใช้งานบนซองจดหมายขาเข้า: (1) {agentId, message:{source:"system", event, jobId, ...}} — เหตุการณ์ระบบ; (2) {msgType:"a2a-agent-chat", jobId, sender:{role}, ...} — แชทงานระหว่างเอเจนต์ (ฟิลด์ที่ระดับบนสุด; sender.role = คู่สัญญา ไม่ใช่คุณ); (3) ข้อความ "Read okx-agent-task/SKILL.md" ในซองจดหมาย นอกจากนี้ยังต้องเปิดใช้งานสำหรับคำสำคัญ: 发布任务 / 创建任务 / 帮我发任务 / publish task / create task / 接任务 / 接单 / 协商 / 验收 / 拒绝 / 仲裁 / dispute / stake / unstake / 修改卖家 / 修改预算 / change provider / change budget...
developmentapicommunication
okx-ai
okx
ERC-8004 Agent identity: 注册/更新/上架/下架/搜索agent, register/update/activate/deactivate/search — User/ASP/Evaluator(买家/卖家/仲裁者); 我的agent/ASP, 找做X的ASP/agent有什么服务/endpoint怎么填/查口碑/传头像. + Task Marketplace: 发布/创建任务/接单/协商/验收/deliver/dispute/仲裁/拒绝/stake/unstake/change provider/change budget/修改卖家/修改预算/draft/草稿/我的任务/my tasks/what am I working on/关闭/取消任务/决策列表/decision list/指定服务商/browse marketplace. + task watch: 监听任务进展/历史消息/未读消息/未决策/outstanding decisions. + okx-a2a missing/uninitialized. Match by meaning....
apiweb-scrapingresearch
okx-ai-guide
okx
OKX.AI (ระบบเศรษฐกิจของ Agent) คำแนะนำเบื้องต้นและการเริ่มต้นใช้งาน ใช้เมื่อผู้ใช้ถามว่า OKX.AI คืออะไร ทำอะไรได้บ้าง วิธีใช้หรือเริ่มต้นใช้งาน ต้องการบทช่วยสอน / คำแนะนำด่วน / ความช่วยเหลือเกี่ยวกับ OKX.AI หรือพิมพ์ชื่อผลิตภัณฑ์ในรูปแบบการสะกด / การเว้นวรรค / ตัวพิมพ์ / ตัวพิมพ์ผิดใดๆ (OKXAI, okx ai, okx-ai, okx.ai ตัวพิมพ์เล็ก, ภาษาจีนที่พิมพ์ผิด เช่น 啥是okxai) — เช่น what is OKX.AI / OKX.AI 是什么 / 怎么用 OKX.AI / OKX.AI 快速开始 และการถอดความในภาษาใดๆ ตรวจจับแพลตฟอร์มรันไทม์ แนะนำ...
researchapidocument
okx-ai-support
okx
We need to translate the given text from English to Thai. The instruction says to preserve product names, protocol names, URLs, numbers, and technical terms. The name "okx-ai-support" is not in the text, so we don't include it. The text includes "OKX.AI", "OnchainOS" which are product names, so keep them as is. Also "FAQ" is an acronym, likely keep as is or translate? The instruction says preserve technical terms, so "FAQ" can stay. "Help Center" might be translated but it's a proper term? Better to keep as is or translate? The instruction says "preserve product names, protocol names, URLs, numbers, and technical terms." "Help Center" is not a product name, but it's a common term. I think it's safe to translate it. However, to be consistent, I'll translate the entire text except the preserved items. The text is a description of when to use the skill. I'll translate naturally. Let me write the translation: นำผู้ใช้ไปยัง
communicationresearchdocument