Skip to main content
The Get 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.

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
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.
If you need swaps and transfers activity, use wallet/activity.

Walkthrough to Get Wallet DeFi Positions for a Wallet

1. Prepare your query

The wallet/defi-positions endpoint requires two parameters:
ParameterDescription
walletWallet address (EVM 0x… or Solana base58)
blockchainsBlockchain 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)
  • 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 Wallet DeFi Positions Demo UI Docs

Summary

The Get 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