Get Wallet Defi-Positions
curl --request GET \
--url https://demo-api.mobula.io/api/2/wallet/defi-positionsimport requests
url = "https://demo-api.mobula.io/api/2/wallet/defi-positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/2/wallet/defi-positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo-api.mobula.io/api/2/wallet/defi-positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo-api.mobula.io/api/2/wallet/defi-positions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api.mobula.io/api/2/wallet/defi-positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/wallet/defi-positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"protocol": {
"name": "<string>",
"id": "<string>",
"logo": "<string>",
"url": "<string>"
},
"positions": [
{
"type": "<string>",
"name": "<string>",
"chain_id": "<string>",
"contract": "<string>",
"created_at": "<string>",
"tokens": [
{
"name": "<string>",
"symbol": "<string>",
"contract": "<string>",
"amount": "<string>",
"amountRaw": "<string>",
"decimals": "<string>",
"amount_usd": "<string>",
"logo": "<string>",
"price_usd": "<string>"
}
],
"rewards": [
{
"name": "<string>",
"symbol": "<string>",
"contract": "<string>",
"amount": "<string>",
"amountRaw": "<string>",
"decimals": "<string>",
"amount_usd": "<string>",
"price_usd": "<string>"
}
],
"extra": {
"lp_token_amount": "<string>",
"position_staked_amount": "<string>",
"factory": "<string>",
"share_of_pool": "<string>",
"health_factor": 123,
"reserve0": "<string>",
"reserve1": "<string>",
"reserve_usd": 123
}
}
]
}
],
"wallets": [
"<string>"
]
}Wallet APIs
Get Wallet DeFi Positions
Retrieve DeFi positions across multiple protocols for a wallet address.
GET
/
2
/
wallet
/
defi-positions
Get Wallet Defi-Positions
curl --request GET \
--url https://demo-api.mobula.io/api/2/wallet/defi-positionsimport requests
url = "https://demo-api.mobula.io/api/2/wallet/defi-positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/2/wallet/defi-positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo-api.mobula.io/api/2/wallet/defi-positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo-api.mobula.io/api/2/wallet/defi-positions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api.mobula.io/api/2/wallet/defi-positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/wallet/defi-positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"protocol": {
"name": "<string>",
"id": "<string>",
"logo": "<string>",
"url": "<string>"
},
"positions": [
{
"type": "<string>",
"name": "<string>",
"chain_id": "<string>",
"contract": "<string>",
"created_at": "<string>",
"tokens": [
{
"name": "<string>",
"symbol": "<string>",
"contract": "<string>",
"amount": "<string>",
"amountRaw": "<string>",
"decimals": "<string>",
"amount_usd": "<string>",
"logo": "<string>",
"price_usd": "<string>"
}
],
"rewards": [
{
"name": "<string>",
"symbol": "<string>",
"contract": "<string>",
"amount": "<string>",
"amountRaw": "<string>",
"decimals": "<string>",
"amount_usd": "<string>",
"price_usd": "<string>"
}
],
"extra": {
"lp_token_amount": "<string>",
"position_staked_amount": "<string>",
"factory": "<string>",
"share_of_pool": "<string>",
"health_factor": 123,
"reserve0": "<string>",
"reserve1": "<string>",
"reserve_usd": 123
}
}
]
}
],
"wallets": [
"<string>"
]
}This endpoint is currently in beta. Protocol coverage and response shape may evolve without notice until it is fully GA.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
wallet | string | Yes | Wallet address (EVM 0x... format or Solana base58 format). |
blockchains | string | Yes | Blockchain name or ID (e.g., solana, ethereum). |
Step-by-Step Tutorial and Video Walkthrough
- Check out the guide: Here
Supported Protocols
Solana
| Category | Protocols |
|---|---|
| Lending | Kamino, MarginFi, Solend |
| DEX (LP) | Orca, Raydium, Meteora |
| Liquid Staking | Jito, Marinade, BlazeStake, Sanctum |
| Native Staking | Solana Stake Program |
| Perps | Drift |
EVM (Ethereum)
| Category | Protocols |
|---|---|
| Lending | Aave V3 |
| Liquid Staking | Lido (stETH, wstETH), Ether.Fi |
| Restaking | EigenLayer |
Usage Examples
- Query DeFi positions on Solana
curl -X GET "https://api.mobula.io/api/2/wallet/defi-positions?wallet=7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs&blockchains=solana" \
-H "Authorization: YOUR_API_KEY"
- Query DeFi positions on Ethereum
curl -X GET "https://api.mobula.io/api/2/wallet/defi-positions?wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&blockchains=ethereum" \
-H "Authorization: YOUR_API_KEY"
Response Format (Solana)
{
"data": {
"wallet": "6Doy9NiFN4euSrkzpbYfyZe7p3pkgERumMmvoGvDEGrP",
"fetchedAt": "2026-01-07T13:44:48.674Z",
"totalValueUSD": "5732.07",
"totalDepositedUSD": "5732.07",
"totalBorrowedUSD": "0.00",
"totalRewardsUSD": "781.11",
"protocols": [
{
"protocol": {
"id": "orca",
"name": "Orca",
"url": "https://www.orca.so",
"logo": "https://i.imgur.com/CdwWqKy.png",
"category": "lp"
},
"totalValueUSD": "5389.51",
"positions": [
{
"id": "orca-whirlpool-HjAfSzsb",
"type": "liquidity",
"name": "SOL/USDC LP",
"valueUSD": 544.02,
"tokens": [
{
"address": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Wrapped SOL",
"decimals": 9,
"amountRaw": "3804402285",
"amountFormatted": 3.804402,
"priceUSD": 138.1587,
"valueUSD": 525.61
},
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"amountRaw": "0",
"amountFormatted": 0,
"priceUSD": 1.0002,
"valueUSD": 0
}
],
"rewards": [
{
"address": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "SOL Fees",
"decimals": 9,
"amountRaw": "49891954",
"amountFormatted": 0.049892,
"priceUSD": 138.1587,
"valueUSD": 6.89
},
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"symbol": "USDC",
"name": "USDC Fees",
"decimals": 6,
"amountRaw": "11513560",
"amountFormatted": 11.51356,
"priceUSD": 1.0002,
"valueUSD": 11.52
}
],
"metadata": {
"type": "liquidity",
"poolAddress": "HJPjoWUrhoZzkNfRpHuieeFk9WcZWjwy6PBjZ81ngndJ",
"poolName": "SOL/USDC",
"poolType": "clmm",
"tickLower": -14784,
"tickUpper": -11456,
"inRange": false
}
}
]
},
{
"protocol": {
"id": "jito",
"name": "Jito",
"url": "https://www.jito.network",
"logo": "https://i.imgur.com/DlFDSQZ.png",
"category": "liquid-staking"
},
"totalValueUSD": "64.86",
"positions": [
{
"id": "jito-stake-jitosol-6Doy9NiF",
"type": "stake",
"name": "Jito Staked SOL",
"valueUSD": 64.86,
"tokens": [
{
"address": "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn",
"symbol": "JitoSOL",
"name": "Jito Staked SOL",
"decimals": 9,
"amountRaw": "374736373",
"amountFormatted": 0.374736,
"priceUSD": 173.09,
"valueUSD": 64.86
}
],
"metadata": {
"type": "liquid-staking",
"lstMint": "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn",
"lstSymbol": "JitoSOL",
"exchangeRate": "1.254063",
"apy": "0.0589"
}
}
]
},
{
"protocol": {
"id": "marinade",
"name": "Marinade",
"url": "https://marinade.finance",
"logo": "https://i.imgur.com/dPtPylG.png",
"category": "liquid-staking"
},
"totalValueUSD": "4.20",
"positions": [
{
"id": "marinade-stake-msol-6Doy9NiF",
"type": "stake",
"name": "Marinade Staked SOL",
"valueUSD": 4.2,
"tokens": [
{
"address": "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",
"symbol": "mSOL",
"name": "Marinade Staked SOL",
"decimals": 9,
"amountRaw": "22490760",
"amountFormatted": 0.022491,
"priceUSD": 186.57,
"valueUSD": 4.2
}
],
"metadata": {
"type": "liquid-staking",
"lstMint": "mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",
"lstSymbol": "mSOL",
"exchangeRate": "1.350434",
"apy": "0.0605"
}
}
]
},
{
"protocol": {
"id": "drift",
"name": "Drift",
"url": "https://app.drift.trade",
"logo": "https://i.imgur.com/NGsiS9n.png",
"category": "perps"
},
"totalValueUSD": "1250.50",
"positions": [
{
"id": "drift-perp-0-subaccount-0",
"type": "leverage",
"name": "drift-sol-usd LONG",
"valueUSD": 1250.50,
"tokens": [],
"metadata": {
"type": "perp",
"id": "drift-perp-0-subaccount-0",
"marketId": "drift-sol-usd",
"exchange": "drift",
"side": "BUY",
"entryPriceQuote": 180.5,
"currentPriceQuote": 185.2,
"currentLeverage": 5.2,
"liquidationPriceQuote": 145.8,
"amountUSD": 6500.0,
"amountRaw": "35000000000",
"unrealizedPnlUSD": 250.50,
"unrealizedPnlPercent": 20.04,
"realizedPnlUSD": 0,
"realizedPnlPercent": 0,
"feesOpeningUSD": 0,
"feesClosingUSD": 0,
"feesFundingUSD": 0,
"tp": [],
"sl": [],
"lastUpdate": "2026-01-15T10:30:00.000Z",
"address": "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
"chainId": "solana:solana",
"collateralAsset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
}
]
},
{
"protocol": {
"id": "solana-native-staking",
"name": "Solana Native Staking",
"url": "https://solana.com/staking",
"logo": "https://i.imgur.com/QV2QY1p.png",
"category": "native-staking"
},
"totalValueUSD": "862658.11",
"positions": [
{
"id": "solana-native-staking-2zkWd6QsjgGMqJ5qmRCt8hRmyiRCEDx3SYXaR288Maa9",
"type": "stake",
"name": "Staked SOL (active)",
"valueUSD": 849949.53,
"tokens": [
{
"address": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"name": "Solana",
"decimals": 9,
"amountRaw": "6688000000000",
"amountFormatted": 6688,
"priceUSD": 127.09,
"valueUSD": 849949.53
}
],
"metadata": {
"type": "native-staking",
"stakeAccountAddress": "2zkWd6QsjgGMqJ5qmRCt8hRmyiRCEDx3SYXaR288Maa9",
"validatorVoteAccount": "7MKUXUiiVeWFwLaNyw5exkujXnen5yB77hQa54KLD98h",
"validatorCommission": 5,
"activationState": "active",
"activationEpoch": 882,
"currentEpoch": 915,
"apy": "5.58"
}
}
]
}
]
}
}
Response Format (Ethereum)
{
"data": {
"wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"fetchedAt": "2026-01-28T10:30:00.000Z",
"totalValueUSD": "125000.00",
"totalDepositedUSD": "125000.00",
"totalBorrowedUSD": "0.00",
"totalRewardsUSD": "0.00",
"protocols": [
{
"protocol": {
"id": "lido-steth",
"name": "Lido",
"url": "https://lido.fi",
"logo": "https://i.imgur.com/oQeRf5a.png",
"category": "liquid-staking"
},
"totalValueUSD": "50000.00",
"positions": [
{
"id": "lido-steth-stake-steth-0xd8dA6BF2",
"type": "stake",
"name": "Lido Staked ETH",
"valueUSD": 50000.00,
"tokens": [
{
"address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"symbol": "stETH",
"name": "Lido Staked ETH",
"decimals": 18,
"amountRaw": "15000000000000000000",
"amountFormatted": 15.0,
"priceUSD": 3333.33,
"valueUSD": 50000.00
}
],
"metadata": {
"type": "liquid-staking",
"lstMint": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"lstSymbol": "stETH",
"exchangeRate": "1.000000",
"apy": "0.0350"
}
}
]
},
{
"protocol": {
"id": "etherfi",
"name": "Ether.Fi",
"url": "https://www.ether.fi",
"logo": "https://i.imgur.com/hSxOVGx.png",
"category": "liquid-staking"
},
"totalValueUSD": "25000.00",
"positions": [
{
"id": "etherfi-stake-weeth-0xd8dA6BF2",
"type": "stake",
"name": "Wrapped eETH",
"valueUSD": 25000.00,
"tokens": [
{
"address": "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"symbol": "weETH",
"name": "Wrapped eETH",
"decimals": 18,
"amountRaw": "7000000000000000000",
"amountFormatted": 7.0,
"priceUSD": 3571.43,
"valueUSD": 25000.00
}
],
"metadata": {
"type": "liquid-staking",
"lstMint": "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"lstSymbol": "weETH",
"exchangeRate": "1.071500",
"apy": "0.0380"
}
}
]
},
{
"protocol": {
"id": "eigenlayer",
"name": "EigenLayer",
"url": "https://app.eigenlayer.xyz",
"logo": "https://i.imgur.com/zOYFWGK.png",
"category": "restaking"
},
"totalValueUSD": "50000.00",
"positions": [
{
"id": "eigenlayer-stake-steth",
"type": "stake",
"name": "stETH Restaked",
"valueUSD": 50000.00,
"tokens": [
{
"address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"symbol": "stETH",
"name": "stETH",
"decimals": 18,
"amountRaw": "15000000000000000000",
"amountFormatted": 15.0,
"priceUSD": 3333.33,
"valueUSD": 50000.00
}
],
"metadata": {
"type": "restaking",
"strategyAddress": "0x93c4b944D05dfe6df7645A86cd2206016c51564D",
"strategyName": "stETH Strategy",
"underlyingToken": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"underlyingSymbol": "stETH",
"operatorAddress": "0x1234567890123456789012345678901234567890",
"isDelegated": true,
"sharesRaw": "15000000000000000000"
}
}
]
}
]
}
}
Metadata by Category
Lending Metadata
| Field | Type | Description |
|---|---|---|
market | string | Market name (e.g., “Main Market”, “JLP Market”). |
healthFactor | string | Account health factor. |
liquidationThreshold | string | Liquidation threshold. |
ltv | string | Loan-to-value ratio. |
supplyAPY | string | Total supply APY (base + token yield). |
baseSupplyAPY | string | Base lending APY from protocol. |
tokenAPY | string | Native yield for LSTs/yield-bearing tokens. |
borrowAPY | string | Borrow APY. |
utilizationRate | string | Reserve utilization rate. |
Liquidity (DEX) Metadata
| Field | Type | Description |
|---|---|---|
poolAddress | string | Pool contract address. |
poolName | string | Pool name (e.g., “SOL/USDC”). |
poolType | string | Pool type: amm, clmm, or dlmm. |
shareOfPool | string | User’s share of the pool. |
fee24h | string | Fees earned in last 24 hours. |
apy | string | Estimated APY. |
tickLower | number | Lower tick bound (CLMM/DLMM only). |
tickUpper | number | Upper tick bound (CLMM/DLMM only). |
inRange | boolean | Whether position is currently in range. |
Liquid Staking Metadata
| Field | Type | Description |
|---|---|---|
lstMint | string | LST token address (Solana mint or EVM contract). |
lstSymbol | string | LST token symbol (e.g., “mSOL”, “JitoSOL”, “stETH”, “wstETH”, “eETH”). |
exchangeRate | string | LST to native token exchange rate. |
apy | string | Staking APY. |
unstakePending | string | Amount pending unstake (Solana: SOL, EVM: varies by protocol). |
- Solana: Jito (JitoSOL), Marinade (mSOL), BlazeStake (bSOL), Sanctum (various LSTs)
- EVM: Lido (stETH, wstETH), Ether.Fi (eETH, weETH)
Restaking Metadata
| Field | Type | Description |
|---|---|---|
strategyAddress | string | EigenLayer strategy contract address. |
strategyName | string | Strategy name (e.g., “stETH Strategy”). |
underlyingToken | string | Underlying token address. |
underlyingSymbol | string | Underlying token symbol (e.g., “stETH”, “cbETH”). |
operatorAddress | string | Delegated operator address (if delegated). |
isDelegated | boolean | Whether shares are delegated to an operator. |
sharesRaw | string | Raw shares amount (bigint as string). |
- EVM: EigenLayer (Ethereum mainnet)
Native Staking Metadata
| Field | Type | Description |
|---|---|---|
stakeAccountAddress | string | Solana stake account address. |
validatorVoteAccount | string | Validator vote account address. |
validatorName | string | Validator name (if available). |
validatorCommission | number | Validator commission percentage (0-100). |
activationState | string | Stake state: activating, active, deactivating, inactive. |
activationEpoch | number | Epoch when stake was activated. |
deactivationEpoch | number | Epoch when stake deactivation started (if applicable). |
currentEpoch | number | Current Solana epoch. |
apy | string | Estimated staking APY based on inflation and validator commission. |
Perps Metadata
| Field | Type | Description |
|---|---|---|
id | string | Unique position identifier. |
marketId | string | Market identifier (e.g., “drift-sol-usd”). |
exchange | string | Exchange name: drift, gains, hyperliquid, gte, lighter. |
side | string | Position side: BUY (Long) or SELL (Short). |
entryPriceQuote | number | Entry price. |
currentPriceQuote | number | Current mark/oracle price. |
currentLeverage | number | Current effective leverage. |
liquidationPriceQuote | number | Estimated liquidation price. |
amountUSD | number | Position size in USD. |
amountRaw | string | Raw position amount (bigint as string). |
unrealizedPnlUSD | number | Unrealized profit/loss in USD. |
unrealizedPnlPercent | number | Unrealized PnL as percentage. |
realizedPnlUSD | number | Realized profit/loss in USD. |
realizedPnlPercent | number | Realized PnL as percentage. |
feesOpeningUSD | number | Opening fees in USD. |
feesClosingUSD | number | Closing fees in USD. |
feesFundingUSD | number | Cumulative funding fees in USD. |
tp | array | Take profit orders: [{size, price, id}]. |
sl | array | Stop loss orders: [{size, price, id}]. |
openDate | string | Position open date (ISO 8601). |
lastUpdate | string | Last update timestamp (ISO 8601). |
address | string | Wallet address. |
chainId | string | Chain identifier (e.g., “solana:solana”). |
collateralAsset | string | Collateral token address. |
Query Parameters
Wallet address (EVM or Solana)
Required string length:
32 - 44Chain ID to fetch positions from (e.g., "solana:solana", "evm:1")
⌘I