
Okx Defi Portfolio
Ask your coding agent to summarize cross-chain DeFi staking, lending, and protocol positions from a wallet address without opening each DApp.
Overview
okx-defi-portfolio is an agent skill for the Grow phase that lists cross-chain DeFi positions and protocol-level holdings via the OKX onchainos CLI when the user has not named a specific DApp.
Install
npx skills add https://github.com/okx/onchainos-skills --skill okx-defi-portfolioWhat is this skill?
- Two onchainos CLI commands for DeFi positions overview and per-protocol position detail
- Aggregates holdings across named chains (e.g. ethereum, bsc, solana) from a single wallet address
- Routes deposit, redeem, and claim flows to okx-defi-invest instead of this read-only skill
- Routes named third-party DApps (Aave, Hyperliquid, Polymarket) to okx-dapp-discovery for plugin-native views
- Explicit disambiguation from okx-wallet-portfolio (token balances) and okx-dex-swap (spot swaps)
- 2 onchainos commands for DeFi positions overview and per-protocol detail
- Skill version 3.3.9 in SKILL.md metadata
Adoption & trust: 3.7k installs on skills.sh; 284 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need a single cross-protocol view of staking, lending, and DeFi exposure, but bouncing between chain explorers and DApp dashboards is slow and error-prone in agent-driven workflows.
Who is it for?
Solo builders using OKX OnChain OS who want agent-triggered, read-only DeFi portfolio checks across several chains from one wallet address.
Skip if: Users who only want ERC-20 wallet balances, intend to swap on a DEX, or explicitly ask for a named DApp’s native position screen—use okx-wallet-portfolio, okx-dex-swap, or okx-dapp-discovery instead.
When should I use this skill?
User asks to check DeFi positions, view DeFi holdings, show staking or lending positions, or DeFi portfolio balance without naming a specific third-party DApp.
What do I get? / Deliverables
You get an aggregated DeFi positions report from onchainos defi positions, with clear routing to okx-defi-invest for deposits or claims and okx-dapp-discovery when a named protocol needs its own plugin view.
- Multi-chain DeFi positions overview from onchainos defi positions
- Per-protocol position detail suitable for follow-up invest or discovery skills
Recommended Skills
Journey fit
Portfolio and position overviews support ongoing measurement of what capital is deployed—typical growth and operations analytics for builders shipping crypto products. Holdings breakdowns, per-protocol detail, and multi-chain aggregation are analytics workflows, not trade execution or wallet-wide token sweeps.
How it compares
Read-only DeFi position aggregation via OKX CLI—not a swap executor, invest workflow, or per-DApp discovery plugin.
Common Questions / FAQ
Who is okx-defi-portfolio for?
Indie builders and solo operators who use AI coding agents with OKX OnChain OS and need quick, protocol-agnostic DeFi position reads across chains.
When should I use okx-defi-portfolio?
Use it when you ask to check DeFi holdings, staking or lending positions, or a DeFi portfolio without naming Aave, Hyperliquid, or another DApp; pair it with grow analytics while building, and with operate monitoring when you are watching live deployments.
Is okx-defi-portfolio safe to install?
It is MIT-licensed OKX skill metadata that guides CLI calls with a wallet address you supply; review the Security Audits panel on this Prism page and treat pasted addresses and RPC traffic as sensitive before running commands.
Workflow Chain
Then invoke: okx defi invest, okx dapp discovery
SKILL.md
READMESKILL.md - Okx Defi Portfolio
# OKX DeFi Portfolio 2 commands for viewing DeFi positions and holdings across protocols and chains. ## Skill Routing - For DeFi deposit/redeem/claim → use `okx-defi-invest` - For token price/chart → use `okx-dex-market` - For wallet token balances → use `okx-wallet-portfolio` - For DEX spot swap → use `okx-dex-swap` ## Quickstart ```bash # Get DeFi holdings overview across chains onchainos defi positions \ --address 0xYourWallet \ --chains ethereum,bsc,solana # Get detailed holdings for a specific protocol (analysisPlatformId from positions output) onchainos defi position-detail \ --address 0xYourWallet \ --chain ethereum \ --platform-id 67890 ``` ## Command Index | # | Command | Description | |---|---------|-------------| | 1 | `onchainos defi support-chains` | Get supported chains for DeFi | | 2 | `onchainos defi support-platforms` | Get supported platforms for DeFi | | 3 | `onchainos defi positions --address <addr> --chains <chains>` | Get user DeFi holdings overview | | 4 | `onchainos defi position-detail --address <addr> --chain <chain> --platform-id <id>` | Get detailed holdings for a protocol | ## Chain Support | Chain | Name / Aliases | chainIndex | |-------|----------------|-----------| | Ethereum | `ethereum`, `eth` | `1` | | BSC | `bsc`, `bnb` | `56` | | Polygon | `polygon`, `matic` | `137` | | Arbitrum | `arbitrum`, `arb` | `42161` | | Base | `base` | `8453` | | X Layer | `xlayer`, `okb` | `196` | | Avalanche | `avalanche`, `avax` | `43114` | | Optimism | `optimism`, `op` | `10` | | Fantom | `fantom`, `ftm` | `250` | | Sui | `sui` | `784` | | Tron | `tron`, `trx` | `195` | | TON | `ton` | `607` | | Linea | `linea` | `59144` | | Scroll | `scroll` | `534352` | | zkSync | `zksync` | `324` | | Solana | `solana`, `sol` | `501` | ## Operation Flow ### Step 0: 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, and query positions for each - Always confirm the resolved address with the user before proceeding if the account has multiple a