# Nansen DeFi Holdings

> Nansen DeFi Holdings is a free API for AI agents from Nansen at api.nansen.ai, Free, status unknown (last checked 2026-10-09).

Returns a wallet's aggregated DeFi positions across protocols, including assets, debts, rewards, and token-level breakdowns by chain.

## Facts

- Endpoint: POST https://api.nansen.ai/api/v1/portfolio/defi-holdings?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 1
- Provider: Nansen
- Docs: https://docs.nansen.ai
- Website: https://nansen.ai
- Tags: blockchain, smart-money, wallet, tokens, defi, analytics, profiler, dex, pnl, onchain, prediction-market, data
- Canonical page: https://www.zero.xyz/c/nansen-defi-holdings-cc727aef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dPXN-b3ZMrufHpiS61MsA

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nansen-defi-holdings-cc727aef -d '<json body>'
```

Example prompt: Can you pull up the DeFi holdings for wallet 0x4062b997279de7213731dbe00485722a26718892 — I want to see the total portfolio value, which protocols it's in, what's deposited vs borrowed, and any unclaimed rewards?

## When to prefer this

Use this endpoint when you need a clean, aggregated view of a wallet's DeFi exposure across protocols and chains — especially for portfolio dashboards, smart money tracking, or risk assessment. Prefer over raw on-chain queries when you need protocol-level summaries, position type classification (deposit/stake/borrow), and USD valuations in a single call.

## Known failure modes

- Invalid or malformed wallet address returns a 400 validation error
- Wallet address with no DeFi activity may return empty protocols array and zero values
- Unsupported chain or newly deployed contracts may be omitted from results
- Rate limiting or auth errors return 401/429 if API key is invalid or quota exceeded
- Truncated response schema may omit some fields for very large portfolios

## How this service works

Get simplified DeFi holdings for a wallet address with aggregated tokens
        and protocol summaries in a user-friendly format.

## Output

Returns a summary object with total_value_usd, total_assets_usd, total_debts_usd, total_rewards_usd, token_count, and protocol_count, plus a list of protocol-level holdings each containing chain, token positions (symbol, amount, USD value, position type: deposit/stake/borrow/mixed), and per-protocol asset/debt/reward totals.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "PortfolioDefiHoldingsRequest",
 "required": [
  "wallet_address"
 ],
 "properties": {
  "address": {
   "anyOf": [
    {
     "type": "string"
    }
   ],
   "title": "Address",
   "deprecated": true,
   "description": "Deprecated: Use 'wallet_address' instead. Alias of `wallet_address`. If you send both fields, they must contain the same address."
  },
  "wallet_address": {
   "type": "string",
   "title": "Wallet Address",
   "examples": [
    "0x4062b997279de7213731dbe00485722a26718892"
   ],
   "description": "Wallet address to get DeFi holdings for"
  }
 },
 "description": "Request model for portfolio DeFi holdings endpoint."
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "PortfolioDefiHoldingsResponse",
 "required": [
  "summary",
  "protocols"
 ],
 "properties": {
  "summary": {
   "type": "object",
   "title": "HoldingsSummary",
   "required": [
    "total_value_usd",
    "total_assets_usd",
    "total_debts_usd",
    "total_rewards_usd",
    "token_count",
    "protocol_count"
   ],
   "properties": {
    "token_count": {
     "type": "integer",
     "title": "Token Count",
     "description": "Total number of unique tokens"
    },
    "protocol_count": {
     "type": "integer",
     "title": "Protocol Count",
     "description": "Total number of protocols"
    },
    "total_debts_usd": {
     "type": "number",
     "title": "Total Debts Usd",
     "description": "Total USD value of all debts"
    },
    "total_value_usd": {
     "type": "number",
     "title": "Total Value Usd",
     "description": "Total USD value of all holdings"
    },
    "total_assets_usd": {
     "type": "number",
     "title": "Total Assets Usd",
     "description": "Total USD value of all assets"
    },
    "total_rewards_usd": {
     "type": "number",
     "title": "Total Rewards Usd",
     "description": "Total USD value of all rewards"
    }
   },
   "description": "Summary statistics for DeFi holdings."
  },
  "protocols": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "ProtocolHolding",
    "required": [
     "protocol_name",
     "chain",
     "total_value_usd",
     "total_assets_usd",
     "total_debts_usd",
     "total_rewards_usd",
     "tokens"
    ],
    "properties": {
     "chain": {
      "type": "string",
      "title": "Chain",
      "description": "Blockchain network"
     },
     "tokens": {
      "type": "array",
      "items": {
       "type": "object",
       "title": "ProtocolToken",
       "required": [
        "symbol",
        "amount",
        "value_usd",
        "position_type"
       ],
       "properties": {
        "amount": {
         "anyOf": [
          {
           "type": "number"
          }
         ],
         "title": "Amount",
         "description": "Token amount"
        },
        "symbol": {
         "anyOf": [
          {
           "type": "string"
          }
         ],
         "title": "Symbol",
         "description": "Token symbol"
        },
        "address": {
         "anyOf": [
          {
           "type": "string"
          }
         ],
         "title": "Address",
         "description": "Token contract address (null for native
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nansen-defi-holdings-cc727aef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.nansen.ai](https://www.zero.xyz/host/api.nansen.ai/llms.txt)
