okx-defi

作成者: okx

OKX集約型DeFi(特定のDApp名なし)— 商品発見、預入/引出/請求の実行、およびポジション表示。**ユーザーがサードパーティのプロトコル/DApp(Aave、Lido、PancakeSwap、Uniswap、Curve、Compound、Morpho、Pendle、Kamino、Raydium、Hyperliquid、Polymarketなど)を指定した場合、「自分のAaveポジションを表示」であっても、okx-dapp-discoveryにルーティング — ここにはルーティングしない。** INVESTトリガー:「DeFiに投資」、「利回りを得る」、「最良のAPYを探す」、「利回りのために預入/ステーク」、「DeFi商品を検索」など。

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

OKX DeFi (experimental merge of okx-defi-invest + okx-defi-portfolio)

Multi-chain, OKX-aggregated DeFi in two capabilities behind one skill. Both wrap the same onchainos defi CLI command group.

Pre-flight Checks

Read ../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, read _shared/preflight.md instead.

Intent Routing

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 overview (持仓)portfolio.md
Per-protocol position detail (持仓详情)portfolio.md
Exact parameters / return schemas — invest & 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.

Skill Routing

  • For DApp-named investing/lending/staking/positions ("on Aave", "my Hyperliquid balance") → use okx-dapp-discovery
  • For token price/chart or token search by name/contract → use okx-dex-market
  • For DEX spot swap execution → use okx-agentic-wallet
  • For wallet token balances → use okx-agentic-wallet
  • For broadcasting signed transactions → use okx-agentic-wallet
  • For Agentic Wallet login, balance, contract-call → use okx-agentic-wallet

Chain Support

CLI resolves chain names automatically (e.g. ethereum1, bsc56, solana501). Full alias table: references/portfolio.md §Chain Support.

Step 0: Address Resolution (shared by both capabilities)

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 (shared — CRITICAL)

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)
  • For CLI parameter details, see references/invest-cli-reference.md (invest & charts) and references/portfolio-cli-reference.md (positions)

okxのその他のスキル

okx-agent-identity
okx
We need to translate the given text from English/Chinese to Japanese. The text describes an agent identity system on XLayer using ERC-8004. It includes roles and usage examples. We must preserve the name "okx-agent-identity" but it's not in the text, so we ignore. Translate the entire text inside <text> to Japanese, keeping technical terms like ERC-8004, XLayer, agent, ASP, etc. Also keep the Chinese terms as they are? The instruction says preserve product names, protocol names, URLs, numbers, technical terms. The Chinese terms like 用户, 买家, etc. are part of the roles and usage examples. Should we translate them to Japanese? The source text has both English and Chinese. The target language is Japanese, so we should translate the English and Chinese into Japanese. But the Chinese terms are listed as alternatives for roles. For consistency, we should translate them to Japanese equivalents. However, the instruction says "preserve product names, protocol names, URLs, numbers, and technical terms." The Chinese words like
developmentapi
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-agentic-wallet
okx
OKX Agentic WalletとそのGas Station機能に関する信頼できる情報源。Gas Stationは、サードパーティのRelayerを介したSolana上のOKXのステーブルコインガス機能であり、Solanaのみ対応、EIP-7702非対応。Gas Stationに関する質問(概要、動作方法、対応トークン、手数料、有効化/無効化、デフォルトガストークンの変更、Jito Bundler互換性)およびウォレット操作全般(ログイン、OTP認証、アカウントの追加/切り替え/ステータス確認/ログアウト、残高、資産、保有状況、アドレス、入金/受取/チャージなど)には必ず呼び出すこと。
apiweb-scrapingdevelopment
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-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-agent-payments-protocol
okx
We need to translate the given English text into Japanese, preserving the specified name "okx-agent-payments-protocol" but not including it unless it appears in the source text. The source text does not contain that name, so we just translate the text inside <text>. The text is a description of when to use the agent skill. We must preserve product names, protocol names, URLs, numbers, technical terms. So terms like HTTP 402, x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, paymentId, a2a_ link, creating / checking a payment link, A2MCP, A2MCP endpoint, Agent's endpoint, concrete endpoint should be kept as is or with appropriate Japanese punctuation. Also note the ellipsis at the end. We need to produce
okx-security
okx
We need to translate the given text from English to Japanese. The text describes a skill for security scanning. We must preserve the name "okx-security" but it's not in the text, so we don't include it. We translate the entire text inside <text>. No extra commentary, no labels. Just the translation. The text: "Use this skill for security scanning: check transaction safety, is this transaction safe, pre-execution check, security scan, token risk scanning, honeypot detection, DApp/URL phishing detection, message signature safety, malicious transaction detection, approval safety checks, token approval management. Triggers: 'is this token safe', 'check token security', 'honeypot check', 'scan this tx', 'scan this swap tx', 'tx risk check', 'is this URL a scam', 'check if this dapp is safe', 'phishing..." We need to translate naturally into Japanese. Keep technical terms like "honeypot", "DApp", "URL", "tx" (transaction), "swap", "phishing
okx-task-watch
okx
We need to translate the text inside <text> from English to Japanese. The instruction says to preserve product names, protocol names, URLs, numbers, and technical terms. The name "okx-task-watch" is not in the text, so we don't include it. We must not add labels or extra commentary. The text contains a mix of Japanese and English phrases. The target language is Japanese, so we should translate the English parts into Japanese, but keep technical terms like "okx-a2a", "user watch", "user outdated-list", "decision_request", etc. Also preserve "OKX A2A" as is. The text already has some Japanese: "监听任务进展 / 帮我盯着任务 / 任务有动静告诉我 / 历史消息 / 未读消息 / 未决策 / 待决策 / 继续监听" - these are Chinese? Actually, the source text includes Chinese characters. The instruction says "Translate only the text inside <text>." and target language is Japanese. So we need to convert the Chinese parts to Japanese? But
developmentapiproductivity