# Nansen Address PnL

> Nansen Address PnL is a paid API for AI agents from Nansen at api.nansen.ai, paid per call via MPP, $0.01/call, status unknown (last checked 2026-10-10).

Calculates realized and unrealized profit/loss metrics for a wallet address across tokens on a specified blockchain and date range.

## Facts

- Endpoint: POST https://api.nansen.ai/api/v1/profiler/address/pnl?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- 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-pnl-e95992bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oy3deNNchURuq1ResoibE

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-pnl-e95992bb -d '<json body>'
```

Example prompt: Can you pull the profit and loss breakdown for wallet 0x39d52da6beec991f075eebe577474fd105c5caec on Ethereum from May 1 to May 3, 2025, including both realized and unrealized gains, showing 10 results per page?

## When to prefer this

Use this endpoint when you need granular, per-token trading performance for a specific wallet address including both realized gains from completed trades and unrealized gains on current holdings. Prefer this over general token holder endpoints when you need cost basis, average price, and ROI metrics specifically. Best for smart money tracking, alpha research, and portfolio performance analysis across 17 supported chains.

## Known failure modes

- Invalid or unsupported chain returns 400 error
- Malformed wallet address returns validation error
- Date range with no trading activity returns empty data array
- Unsupported chain/network combination returns error
- Missing required 'chain' field returns 422 validation error
- Rate limit exceeded returns 429 error
- Insufficient payment or expired payment header returns 402

## How this service works

Calculate profit and loss metrics for a specific address and token. Provides detailed trading performance including realized gains from sales and unrealized gains from current holdings.

What it helps to answer:

- Realized profits or losses from completed token sales
- Unrealized gains or losses on current token holdings
- Average purchase and sale prices for the token
- Total return on investment

## Output

Returns a paginated array of per-token PnL records for the wallet, each containing realized PnL in USD, unrealized/holding value, cost basis, number of buys/sells, bought and sold amounts and USD values, average buy/sell prices, max balance held, current token price, and ROI percentage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "ProfilerAddressPnlRequest",
 "examples": [
  {
   "date": {
    "to": "2025-05-03T23:59:59Z",
    "from": "2025-05-01T00:00:00Z"
   },
   "chain": "ethereum",
   "address": "0x39d52da6beec991f075eebe577474fd105c5caec",
   "pagination": {
    "page": 1,
    "per_page": 10
   }
  },
  {
   "date": {
    "to": "2025-05-03T23:59:59Z",
    "from": "2025-05-01T00:00:00Z"
   },
   "chain": "ethereum",
   "pagination": {
    "page": 1,
    "per_page": 10
   },
   "entity_name": "Vitalik Buterin"
  }
 ],
 "required": [
  "chain"
 ],
 "properties": {
  "date": {
   "anyOf": [
    {
     "type": "object",
     "title": "DateRange",
     "properties": {
      "to": {
       "anyOf": [
        {
         "type": "string"
        }
       ],
       "title": "To",
       "examples": [
        "2025-01-31T23:59:59Z"
       ],
       "description": "End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"
      },
      "from": {
       "anyOf": [
        {
         "type": "string"
        }
       ],
       "title": "From",
       "examples": [
        "2025-01-01T00:00:00Z"
       ],
       "description": "Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"
      }
     },
     "description": "Date range model matching the API schema."
    }
   ],
   "examples": [
    {
     "to": "2025-05-03T23:59:59Z",
     "from": "2025-05-01T00:00:00Z"
    }
   ],
   "description": "Date range for PnL analysis (ISO 8601 date-time)"
  },
  "chain": {
   "enum": [
    "all",
    "arbitrum",
    "arc",
    "avalanche",
    "base",
    "bnb",
    "ethereum",
    "linea",
    "mantle",
    "monad",
    "optimism",
    "plasma",
    "polygon",
    "robinhood",
    "sei",
    "solana",
    "sonic",
    "sui"
   ],
   "type": "string",
   "title": "ProfilerPnLChain",
   "description": "Chains supported in profiler PnL analysis."
  },
  "address": {
   "anyOf": [
    {
     "type": "string"
    }
   ],
   "title": "Address",
   "examples": [
    "0x39d52da6beec991f075eebe577474fd105c5caec",
    "8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd"
   ],
   "description": "Wallet address to get PnL for"
  },
  "filters": {
   "anyOf": [
    {
     "type": "object",
     "title": "ProfilerAddressPnlFilters",
     "properties": {
      "show_realized": {
       "anyOf": [
        {
         "type": "boolean"
        }
       ],
       "title": "Show Realized",
       "default": false,
       "examples": [
        true,
        false

… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "ProfilerAddressPnlResponse",
 "required": [
  "pagination",
  "data"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "ProfilerAddressPnl",
    "required": [
     "token_address",
     "token_symbol",
     "nof_buys",
     "nof_sells"
    ],
    "properties": {
     "nof_buys": {
      "type": "string",
      "title": "Nof Buys",
      "description": "Number of buys (either inflow or dex buy)"
     },
     "sold_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Sold Usd",
      "description": "USD value of sold tokens"
     },
     "nof_sells": {
      "type": "string",
      "title": "Nof Sells",
      "description": "Number of sells (either outflow or dex sell)"
     },
     "bought_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Bought Usd",
      "description": "USD value of bought tokens"
     },
     "holding_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Holding Usd",
      "description": "USD value of token balance"
     },
     "sold_amount": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Sold Amount",
      "description": "Amount of tokens sold from date_from to date_to"
     },
     "token_price": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Token Price",
      "description": "Price of the token on date_to"
     },
     "token_symbol": {
      "type": "string",
      "title": "Token Symbol",
      "description": "Symbol of the token"
     },
     "bought_amount": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Bought Amount",
      "description": "Amount of tokens bought from date_from to date_to"
     },
     "token_address": {
      "type": "string",
      "title": "Token Address",
      "description": "Hexadecimal representation of the token's address"
     },
     "cost_basis_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Cost Basis Usd",
      "description": "Cost basis of tokens in USD as of date_to"
     },
     "holding_amount": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Holding Amount",
      "description": "Current token balance"
     },
     "max_balance_held": {
      "anyOf": [
       {
        "type": "number"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nansen-pnl-e95992bb/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)
