okx-defi

от okx

OKX-агрегированные DeFi (без указания конкретного DApp) — поиск продуктов, выполнение депозита/вывода/клейма, а также просмотр позиций. **Если пользователь называет ЛЮБОЙ сторонний протокол/DApp (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, …), направляйте в okx-dapp-discovery — НЕ сюда, даже для 'показать мои позиции в Aave'.** Триггеры 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)

Больше skills от okx

okx-agent-identity
okx
We need to translate the given text from English/Chinese to Russian. The text describes an agent skill for ERC-8004 on-chain Agent identity on XLayer. It includes actions and roles. The name "okx-agent-identity" is not in the text, so we don't include it. We must preserve product names, protocol names, URLs, numbers, technical terms. The text has mixed English and Chinese terms. We translate the English parts to Russian, but keep Chinese characters as they are? The instruction says "preserve product names, protocol names, URLs, numbers, and technical terms." Chinese terms like "用户" are not product names but are part of the description. However, the text includes Chinese characters as part of the roles and uses. The instruction says "Translate only the text inside <text>." It doesn't specify to keep Chinese. But it says preserve technical terms. Chinese words like "用户" are not technical terms per se, but they are part of the list. Since the target language is Russian, we should translate everything that is not a proper
developmentapi
okx-ai-guide
okx
OKX.AI (экономическая система Агентов) — введение и точка входа. Используйте, когда пользователь спрашивает, что такое 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 = функция стабильной монеты для газа от OKX на Solana через сторонний Relayer; только 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
Используется, когда агент получает HTTP 402 / payment-required, или пользователь упоминает x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, payment channel / voucher / session, channelId / channel_id, открытие / закрытие / пополнение / урегулирование / возврат средств по каналу, paymentId или a2a_ ссылку, создание / проверку платёжной ссылки, A2MCP / конечную точку A2MCP, или отправку запроса / вызов конечной точки Агента с конкретным endpoint...
okx-security
okx
We need to translate the given text from English to Russian. 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 accurately. Terms like "honeypot", "DApp", "URL", "tx" (transaction), "swap", "phishing" are technical and
okx-task-watch
okx
监听任务进展 / 帮我盯着任务 / 任务有动静告诉我 / 历史消息 / 未读消息 / 未决策 / 待决策 / 继续监听 / task watch / user watch / monitor task progress / catch me up on tasks / outstanding decisions — OKX A2A user-session task-notification monitor: live long-poll via `okx-a2a user watch` (also drains backlog of past/missed/unread events on entry) plus un-replied decision_request lister via `okx-a2a user outdated-list`. Not for wallet / gas / task-list / status queries.
developmentapiproductivity