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
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>"
]
}Query Parameters
Wallet address (EVM or Solana)
Required string length:
32 - 44Chain ID to fetch positions from (e.g., "solana:solana", "evm:1")
⌘I