Portfolio
DeFi Holdings API tracks active positions across DeFi protocols.
Data Freshness & Historical Coverage
For data freshness and historical coverage, see Data Coverage by Chain; this endpoint follows it except where noted below.
Returns a current, point-in-time snapshot of active DeFi positions across all chains and protocols — there is no date-range parameter or historical look-back; balances, rewards, and debt update continuously off on-chain activity and reflect within the standard live latency.
Get simplified DeFi holdings for a wallet address with aggregated tokens and protocol summaries in a user-friendly format.
API key for authentication
Request model for portfolio DeFi holdings endpoint.
Wallet address to get DeFi holdings for
0x4062b997279de7213731dbe00485722a26718892Deprecated: Use 'wallet_address' instead. Alias of wallet_address. If you send both fields, they must contain the same address.
Portfolio DeFi holdings data
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
Gateway Timeout
POST /api/v1/portfolio/defi-holdings HTTP/1.1
Host: api.nansen.ai
apikey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"wallet_address": "0x4062b997279de7213731dbe00485722a26718892"
}{
"summary": {
"total_value_usd": 1,
"total_assets_usd": 1,
"total_debts_usd": 1,
"total_rewards_usd": 1,
"token_count": 1,
"protocol_count": 1
},
"protocols": [
{
"protocol_name": "text",
"chain": "text",
"total_value_usd": 1,
"total_assets_usd": 1,
"total_debts_usd": 1,
"total_rewards_usd": 1,
"tokens": [
{
"address": "text",
"symbol": "text",
"amount": 1,
"value_usd": 1,
"position_type": "text"
}
]
}
]
}Output Field Meanings
Top-Level Fields
protocolsUsed
Array of protocol names the wallet actively uses (e.g., "aave-v3-ethereum")
holdingsByProtocol
Detailed breakdown of positions per protocol
success
Boolean indicating API call success
totalProtocols
Count of protocols with detected activity
Position Types within holdingsByProtocol
deposits/lendings
Assets supplied to lending protocols (Aave, Compound), including amounts, value, and rewards
borrows
Borrowed assets with debt ratios and health factors
stakings
Tokens staked for rewards (liquid staking, governance tokens)
positions
Complex positions like LP tokens, derivatives, or structured products
locked
Time-locked or vested tokens (e.g., vote-escrowed tokens)
rewards
Claimable but unclaimed protocol rewards
farms
Yield farming positions with staked LP tokens
Position Detail Structure
type
Position category (e.g., "lending", "common", "locked")
summary
High-level metrics (asset value, rewards, debt)
detail
Granular breakdown including individual token balances, prices, and price changes
Supported Protocols
You can find the list of supported protocols on each supported chain by clicking here.
Usage Guide: Creating Complete Portfolio Overview
Use the following steps to create a complete Portfolio Overview:
Step 1: Fetch DeFi Positions Get active protocol positions, staking rewards, and lending activities. This shows how assets are being used in DeFi.
Step 2: Fetch Wallet Balances (Link Here) Retrieve all token holdings across chains, including idle tokens not actively deployed in protocols.
Step 3: Combine & Analyze
Total Portfolio Value = DeFi positions + wallet balances
Strategy Analysis: Compare liquid vs. staked vs. lending positions
Chain Distribution: Identify multi-chain allocation patterns
Risk Assessment: Analyze borrowing ratios, protocol concentration
Last updated
Was this helpful?