- Fetch all DeFi positions (staked, deposited, LP, locked, rewards)
- Filter by position type and chain
- Group positions by protocol and calculate per-protocol totals
- Build a complete runnable DeFi dashboard
Prerequisites
- A Zerion API key (get one here)
- A wallet address to query
Steps
Response fields reference
Each DeFi position includes:Next steps
- Use
filter[positions]=no_filterto get both DeFi and wallet positions in a single call - Combine with the portfolio endpoint to see total value distribution by type
- Implement pagination to handle wallets with many DeFi positions