Get DeFi positions summary for a wallet across multiple chains
curl --request GET \
--url https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary', 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://api.moralis.com/v1/wallets/{walletAddress}/defi/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://api.moralis.com/v1/wallets/{walletAddress}/defi/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"syncedAt": {
"0x1": 1710000000,
"solana-mainnet": "latest"
},
"unsupportedChains": [
"0x89"
],
"failedChains": [
"0x89"
]
},
"result": {
"activeProtocols": 123,
"totalPositions": 123,
"protocols": [
{
"protocolName": "<string>",
"protocolId": "<string>",
"chainId": "0x1",
"positionCount": 123,
"protocolUrl": {},
"protocolLogo": {},
"totalUsd": {},
"totalUnclaimedUsd": {}
}
],
"totalUsd": {},
"totalUnclaimedUsd": {}
}
}DeFi API
Wallet Protocols
Returns a summary of all DeFi positions for a wallet address across specified chains.
GET
/
v1
/
wallets
/
{walletAddress}
/
defi
/
summary
Get DeFi positions summary for a wallet across multiple chains
curl --request GET \
--url https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary', 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://api.moralis.com/v1/wallets/{walletAddress}/defi/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://api.moralis.com/v1/wallets/{walletAddress}/defi/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/wallets/{walletAddress}/defi/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"meta": {
"syncedAt": {
"0x1": 1710000000,
"solana-mainnet": "latest"
},
"unsupportedChains": [
"0x89"
],
"failedChains": [
"0x89"
]
},
"result": {
"activeProtocols": 123,
"totalPositions": 123,
"protocols": [
{
"protocolName": "<string>",
"protocolId": "<string>",
"chainId": "0x1",
"positionCount": 123,
"protocolUrl": {},
"protocolLogo": {},
"totalUsd": {},
"totalUnclaimedUsd": {}
}
],
"totalUsd": {},
"totalUnclaimedUsd": {}
}
}Authorizations
Path Parameters
The address
Query Parameters
Chains to query
Available options:
0x1, ethereum, 0x15b38, chiliz, 0x19, cro, 0x2105, base, 0x38, binance, 0x440, metis, 0x46f, lisk, 0x504, moon beam, 0x505, moon river, 0x531, sei, 0x64, gnosis, 0x7e4, ronin, 0x89, polygon, 0x8f, monad, 0x92, sonic, 0xa, optimism, 0xa4b1, arbitrum, 0xa86a, avalanche, 0xe708, linea, solana-mainnet, sol, all, mainnets, testnets ⌘I

