Fetching a wallet’s DeFi positions isn’t easy. Between LPs, staked tokens, lending collateral, and rewards, blockchain data is fragmented and hard to interpret.

With Zerion API, you can skip the complexity. A single endpoint returns all DeFi positions for a given wallet address across multiple chains. All positions are normalized, valued in USD (or another currency of your choice), and enriched with protocol data.

In this post, we’ll show you how to fetch DeFi positions in just a few lines of code, explain filtering options, and share best practices for using this data in your app.

TL;DR

You can fetch a wallet’s complete DeFi positions (staking, LPs, collateral, debt, and rewards) across 8,000+ protocols and 26+ EVM chains with one call to Zerion API:

curl --request GET \
     --url 'https://api.zerion.io/v1/wallets/address/positions/?filter[positions]=only_complex' 
  • Normalized and enriched: Returns positions with protocol names, logos, token breakdowns, USD values, and accrued rewards.
  • Multichain: Works across all supported blockchains in a single call; filter by chain if needed.
  • Easy integration: No need to parse smart contracts or maintain subgraphs, integrate in minutes, not weeks.
  • Use cases: Wallets, portfolio apps, tax software, analytics dashboards, and AI agents.

Zerion API makes it simple to add multichain DeFi tracking to your product with minimal engineering.

What “DeFi Positions” Actually Are (and Why Most APIs Get Messy)

When people talk about a wallet’s DeFi positions, they usually mean more than just token balances. A position can be:

  • Liquidity pool (LP) shares — e.g., ETH/USDC in Uniswap
  • Staked tokens — assets locked in staking contracts
  • Lending collateral and debt — supplied and borrowed tokens in protocols like Aave or Morpho
  • Unclaimed rewards — yield, incentives, or farming tokens accrued but not yet claimed

The challenge is that these positions live inside different smart contracts, often with unique logic and token structures. Onchain, they appear as various contract calls, not clear “this wallet is staking 2 ETH in Lido.”

Most APIs that expose raw blockchain data (or even generic token balance endpoints) struggle here:

  • They return contract storage values with no financial meaning.
  • They often cover only a few protocols and on just one chain.
  • Developers end up writing their own parsers or relying on subgraphs that need constant updates.

But if you’re building your own product, you need an API that gives you that same interpreted view, with broad chain coverage and no maintenance overhead. That’s exactly where Zerion API comes in.

Zerion API in One Minute

Zerion API gives developers the same data that is available to users in Zerion portfolio tracker and Zerion Wallet. It includes tokens, NFTs, transactions, and DeFi protocols across 26+ chains. 

Leading wallets and apps like Uniswap, Base, Farcaster, Kraken, and many others use Zerion API to add rich onchain data to their user experiences. 

For app developers, the biggest advantage of Zerion API is that with a single call it can deliver ready-to-use positions for 8,000+ DeFi protocols across dozens of EVM blockchains. 

Zerion API requires no protocol-specific engineering or knowledge. Instead of spending weeks setting up indexers and parsing contracts or maintaining subgraphs, you get normalized, human-readable data in one call. Most builders integrate it in a day or two.

Quickstart: Fetch DeFi Positions in ~10 Lines

Fetching DeFi positons with Zerion API takes just a few steps: grab an API key, add it to your request header, and call the positions endpoint for a wallet address.

Here’s a minimal example in JavaScript that fetches only DeFi protocol positions for a wallet:

const options = {method: 'GET', headers: {accept: 'application/json'}};
fetch('https://api.zerion.io/v1/wallets/0x42b9df65b219b3dd36ff330a4dd8f327a6ada990/positions/?filter[positions]=only_complex&currency=usd&filter[trash]=only_non_trash&sort=value', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

What this does:

  • Calls positions for 0x42b9df65b219b3dd36ff330a4dd8f327a6ada990
  • Applies filter[positions]=only_protocol to exclude simple token balances and return only protocol-level positions (staking, LPs, lending, etc.).
  • Returns a structured JSON response with protocol names, position types, underlying tokens, and USD values.

From here, you can group positions by protocol, display them in a portfolio view, or use the data for analytics and risk checks in your dapp.

Filtering & Shaping the Response

By default, Zerion API wallet positions endpoint will return: 

  • Both token and protocol positions. If you want to get only DeFi positions, you can use the only_complex filter. 
  • Positions from all supported chains. If you’re only interested in specific blockchains, you can filter by chain IDs. 
  • USD values. You can change this to any major fiat currency, BTC, or ETH.  

Additionally, you can use dapp_ids to isolate positions for specific dapps/protocols. You can check the dapps endpoint to see all supported dapps and protocols.

Interpreting Positions for Your Product

Fetching DeFi positions is just the first step. The real value comes from how you use that data in your product. Zerion API is designed to make this easy by returning normalized positions enriched with protocol metadata, USD values, and underlying token breakdowns.

For example, here is how a Uniswap LP position looks in a response from Zerion API: 

"type": "positions",
      "id": "0x4200000000000000000000000000000000000006-base-uniswap v3 weth/usdc pool (#60321)-deposit",
      "attributes": {
        "parent": null,
        "protocol": "Uniswap V3",
        "protocol_module": "liquidity_pool",
        "pool_address": "0xd0b53d9277642d899df5c87a3966a349a798f224",
        "group_id": "2e81724832654bbb9a66cae3f0d6405765b6b61f22351e368e7cfc2e565498b0",
        "name": "Uniswap V3 WETH/USDC Pool (#60321)",
        "position_type": "deposit",
        "quantity": {
          "int": "47808488758558",
          "decimals": 18,
          "float": 0.0000478084887586,
          "numeric": "0.000047808488758558"
        },
        "value": 0.20808546747230408,
        "price": 4352.479504700001,
        "changes": {
          "absolute_1d": 0.0015173896221812588,
          "percent_1d": 0.7345712067293508
        },
        "fungible_info": {
          "name": "Wrapped Ether",
          "symbol": "WETH",
          "icon": {
            "url": "https://cdn.zerion.io/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"
          },
          "flags": {
            "verified": true
          },

As you can see, it’s ready to use in a product and doesn’t require additional work. 

Here are a few common ways developers put this to work:

  • Portfolio apps and wallets. Show users exactly where their assets are deployed without them digging through multiple protocols. Because Zerion API already groups positions by protocol, you can present a clear overview with totals per dapp or chain.
  • Risk and health monitoring. Lending positions include both supplied collateral and outstanding debt. You can use this data to calculate loan-to-value ratios or trigger health warnings inside your app.
  • Analytics and dashboards. Position data can be aggregated across wallets to analyze protocol adoption, liquidity distribution, or market share. This is useful for research products or institutional tools.
  • Tax and compliance software. By combining positions with transaction history, you can reconstruct cost basis, track staking income, or calculate unrealized gains for regulatory reporting.
  • AI agents and alerts. Wallet positions can serve as “state,” while new transactions become “events.” This makes it easy to build bots or agents that notify users when their collateral ratio is risky or when rewards are ready to claim. Some projects like Gina and LoomLay give Zerion API endpoints to agents and let them pick the most relevant ones.

In all these cases, Zerion API saves you from building protocol integrations yourself, letting you focus on product logic and user experience.

Use Case Examples

Some of the best-known companies in crypto use Zerion API to fetch and show DeFi positions in their products or internal dashboards. 

Wallet DeFi Summary View

Safe, the biggest multisig wallet, uses Zerion API’s complex positions endpoint to show DeFi positions across multiple chains. 

Tax Software 

Waltio, a leading crypto tax software, uses Zerion API’s wallet positions endpoints to fetch DeFi positions from multiple blockchains in a single call. Zerion’s robust data infrastructure allowed Waltio to offer detailed, reliable tax reporting and portfolio insights without additional blockchain infrastructure.

Analytics and dashboards

CMT Digital, a leading global VC firm, uses Zerion’s complex positions endpoint to fetch a detailed DeFi portfolio for informed investment decisions.


Whether you’re building a new product or want to add DeFi positions as a feature, Zerion API makes it very easy.

Get Started

Zerion API makes fetching DeFi positions across multiple blockchains simple — just use one call to fetch positions from 8,000+ protocols on 26, + EVM networks. 

It’s also very easy to get started with Zerion API: 

  1. Fill out this form to apply for a free dev key 
  2. Get your dev key and start building! 

The free dev key includes up to 3k requests per day, which should be enough to build a proof of concept. 

Once you’re ready to deploy in production, you can start with just $99/month, which includes 150k requests per day with up to 150 RPS. If you need more scale, we’re always happy to hop on a call and discuss what you need. 


FAQ

Why is it so hard to get DeFi positions for a wallet address? 

Because DeFi positions aren’t simple token balances. They live inside smart contracts with unique logic: staking vaults, LP pools, lending protocols, reward contracts. Raw onchain calls return low-level data without financial meaning. To interpret them, you’d normally need to parse each protocol’s contracts or maintain subgraphs. Zerion API solves this by returning normalized, human-readable positions in one call.

How to get DeFi positions from multiple chains? 

With Zerion API, you don’t need separate integrations. The GET https://api.zerion.io/v1/wallets/{address}/positions/ endpoint returns protocol positions across all supported EVM chains. You can filter by blockchain if you want a narrower view, or query once for a unified multichain portfolio.

How to fetch staked token positions? 

Staked tokens are included in Zerion API’s protocol positions.

You can use fetch('https://api.zerion.io/v1/wallets/address/positions/?filter[positions]=only_complex&currency=usd&filter[dapp_ids]=EXAMPLE_PROTOCOL) Instead of EXAMPLE_PROTOCOL you specify the staking protocol, e.g. Aave or Morpho. This will return staking positions along with protocol metadata, token amount, and USD value.

How to fetch liquidity pool positions for a wallet address? 

Liquidity pool shares are also interpreted as protocol positions in Zerion API. The same positions endpoint with the “compex_only” filter will return LP positions, including underlying token breakdowns. You can use this to show both the pool share and its token composition in your app.

How to get staking rewards accrued to a wallet address? 

Unclaimed rewards (like yield or farming incentives) are part of Zerion’s protocol positions endpoint. The response includes accrued rewards alongside staked balances, so you can show users what’s claimable without them calling reward contracts directly. You also get position value in USD, ETH, BTC or any major fiat currency of your choice.  

How to get Uniswap LP positions on multiple chains? 

In Zerion API, all Uniswap positions (and other DEX LPs) are included automatically in the position endpoint. The positions endpoint normalizes LP shares across supported chains (Ethereum, Arbitrum, Optimism, Base, etc.). One call gives you a wallet’s Uniswap LPs across all chains.