Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.2

Get DeFi protocols by wallet

GEThttps://deep-index.moralis.io/api/v2.2/wallets/:address/defi/summary

Get the defi summary of a wallet address.

PATH PARAMS
addressstringrequired
Wallet address
QUERY PARAMS
chainstring
The chain to query
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.wallets.getDefiSummary({
"chain": "0x1",
"address": "0xcB1C1FdE09f811B294172696404e88E658659905"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"active_protocols": "10",
"total_positions": "100",
"total_usd_value": "1000000",
"total_unclaimed_usd_value": "1000000",
"protocols": {
"total_usd_value": "1000000",
"total_unclaimed_usd_value": "1000000",
"positions": "100"
}
}