> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Track Wallet DeFi Positions Across Solana, Ethereum, BNB, Base & More

> Easily retrieve a wallet’s DeFi positions across multiple protocols using the Mobula API.

The [**Get Wallet DeFi Positions**](https://docs.mobula.io/rest-api-reference/endpoint/wallet-defi-positions) endpoint returns a unified view of DeFi positions for a wallet, including **lending, LP positions, liquid staking, native staking,** and **perps** across supported chains and protocols. This is ideal for developers building **DeFi portfolio dashboards**, **wallet analytics**, **yield tracking**, and **on-chain risk monitoring tools**.

***

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden' }}>
  <iframe src="https://www.youtube.com/embed/weWtDCKKjSI" title="YouTube video player" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', border: 0 }} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
</div>

***

## What this endpoint does

With this API, you can:

* Fetch DeFi positions for a wallet across multiple supported protocols
* Get a portfolio-level overview: total value, total deposited, total borrowed, and rewards (USD)
* Group positions by protocol (ex: Orca, Raydium, Kamino, Drift, Aave V3, Lido, EigenLayer)
* Retrieve position-level details, including:
  * underlying tokens and balances
  * position value in USD
  * rewards (fees, incentives, staking rewards)
  * category-specific metadata (LP range, staking APY, lending health factor, perps leverage)

Unlike basic wallet token balance endpoints, this endpoint focuses specifically on **DeFi protocol positions**.

***

## What you’ll need

* Basic knowledge of REST APIs
* A wallet address
* A blockchain value
* A Mobula API key

Note: All Mobula endpoints require an API key.\
Get a free API key: [Here](https://admin.mobula.io/)

Optional:

* Solscan or a block explorer to find wallets that are active in DeFi protocols

***

## When to use Get Wallet DeFi Positions

Use this endpoint when you want to:

* Build a DeFi portfolio view (positions grouped by protocol)
* Track wallet exposure across lending, LPs, staking, restaking, and perps
* Show protocol-level totals and position breakdowns in a dashboard
* Monitor risk signals and leverage details (especially for lending and perps)
* Power yield tracking or DeFi analytics tooling

If you need wallet token balances and PnL per token, use **[wallet/positions](https://docs.mobula.io/rest-api-reference/endpoint/wallet-positions)**.\
If you need swaps and transfers activity, use **[wallet/activity](https://docs.mobula.io/rest-api-reference/endpoint/wallet-activity)**.

***

## Walkthrough to Get Wallet DeFi Positions for a Wallet

### 1. Prepare your query

The `wallet`/`defi-positions` endpoint requires two parameters:

| Parameter     | Description                                           |
| ------------- | ----------------------------------------------------- |
| `wallet`      | Wallet address (EVM 0x… or Solana base58)             |
| `blockchains` | Blockchain name or ID (example: `solana`, `ethereum`) |

### 2. Find a wallet address to test (Solana example)

To retrieve real wallet data:

1. Open Solscan
2. Search for a supported DeFi protocol (example: Kamino)
3. Open a wallet that interacts with that protocol
4. Copy the wallet address

This address is used as the `wallet` parameter.

### 3. Fill the API form

* Paste the wallet address into `wallet`
* Set `blockchains` to the chain you want (example: [solana](https://docs.mobula.io/blockchains/solana))
* Click **Send**

The API will return the wallet’s DeFi positions across supported protocols on that chain.

***

## Reviewing the wallet DeFi positions response

The response is structured for dashboards:

### Portfolio

* Total value in USD
* Total deposited and borrowed
* Total rewards in USD

### Protocols

Each protocol includes:

* protocol metadata (name, category, logo, URL)
* total value per protocol
* positions list

### Positions

Each position includes:

* position name/type (stake, lending, liquidity, perp, etc.)
* position USD value
* underlying tokens (amounts and USD values)
* optional rewards
* category-specific metadata

This makes it easy to build a DeFi portfolio UI with protocol grouping.

***

## Try It Live with Mobula Wallet DeFi Positions Demo (UI)

You can also test this endpoint using our demo UI:

[Demo UI Homepage](https://mobula-demo-endpoint-production.up.railway.app/)

[Wallet DeFi Positions Demo UI](https://mobula-demo-endpoint-production.up.railway.app/wallet-defi-positions)

[Docs](https://docs.mobula.io/rest-api-reference/endpoint/wallet-defi-positions)

***

## Summary

The [Get Wallet DeFi Positions](https://docs.mobula.io/rest-api-reference/endpoint/wallet-defi-positions) endpoint provides a DeFi-native portfolio view, including:

* Protocol-level grouping of positions
* Lending, LP, staking, restaking, and perps coverage (depending on chain)
* USD totals for wallet value, deposits, borrows, and rewards
* Position-level breakdown with tokens and DeFi metadata

If you’re building DeFi dashboards, yield trackers, or wallet analytics, this endpoint gives you a clean DeFi portfolio layer without manual protocol integrations.

***

## Try Mobula for Free

Try our free API today and start building in minutes.\
Get your free API key: [Here](https://admin.mobula.io/)
