# Nansen Prediction Market PnL by Address

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

Returns per-market profit and loss breakdown for a specific wallet address across all prediction markets, including buy costs, sell proceeds, redemption values, and unrealized positions.

## Facts

- Endpoint: POST https://api.nansen.ai/api/v1/prediction-market/pnl-by-address?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP, x402
- Status: unknown
- Last checked: 2026-10-11
- 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-by-address-93f90f8a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jEZZZQw-VBc46j3T83J7a

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-by-address-93f90f8a -d '<json body>'
```

Example prompt: Pull up the prediction market PnL breakdown for wallet 0x1234567890abcdef1234567890abcdef12345678 — show all markets they've traded sorted by total PnL from highest to lowest, including any unrealized positions.

## When to prefer this

Use this endpoint when you need to evaluate a specific wallet's trading performance and profitability across prediction markets, especially for smart money analysis, trader profiling, or identifying which markets a wallet has been active in. Prefer this over general DEX or token PnL endpoints when the focus is specifically on prediction market positions and outcomes.

## Known failure modes

- Invalid or malformed wallet address returns a validation error
- Address with no prediction market activity returns an empty data array
- Invalid sort field or direction in order_by causes a 422 validation error
- Pagination page/per_page out of range returns a 422 error
- Rate limit exceeded or missing/invalid API key returns 401 or 429

## How this service works

Get profit and loss across all prediction markets for a specific wallet address.
Shows per-market PnL including buy costs, sell proceeds, and redemption values.

**What it helps to answer:**

1. **What is a trader's total PnL across all prediction markets?**
2. **Which markets has this address traded, and what were the results?**
3. **Does this trader have unrealized positions?**

## Output

A paginated list of per-market PnL records for the wallet, each containing the market question, event title, side held (Yes/No), net buy cost in USD, net sell proceeds in USD, redemption value in USD, unrealized value in USD, total PnL in USD, and whether the market is resolved. Includes pagination metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "PnlByAddressRequest",
 "required": [
  "address"
 ],
 "properties": {
  "address": {
   "type": "string",
   "title": "Address",
   "examples": [
    "0x1234567890abcdef1234567890abcdef12345678"
   ],
   "maxLength": 100,
   "minLength": 1,
   "description": "Wallet address (hex, with or without 0x prefix)"
  },
  "order_by": {
   "anyOf": [
    {
     "type": "array",
     "items": {
      "type": "object",
      "title": "PnlByAddressSortOrder",
      "required": [
       "field",
       "direction"
      ],
      "properties": {
       "field": {
        "enum": [
         "total_pnl_usd"
        ],
        "type": "string",
        "title": "PnlByAddressSortField",
        "description": "Sortable fields for PnL by address endpoint."
       },
       "direction": {
        "enum": [
         "ASC",
         "DESC"
        ],
        "type": "string",
        "title": "SortDirection",
        "description": "Enum for sort directions."
       }
      }
     }
    }
   ],
   "title": "Order By",
   "examples": [
    [
     {
      "field": "total_pnl_usd",
      "direction": "DESC"
     }
    ]
   ],
   "description": "Sort order"
  },
  "pagination": {
   "type": "object",
   "title": "PaginationRequest",
   "properties": {
    "page": {
     "type": "integer",
     "title": "Page",
     "default": 1,
     "minimum": 1,
     "description": "Page number (1-based)"
    },
    "per_page": {
     "type": "integer",
     "title": "Per Page",
     "default": 10,
     "maximum": 1000,
     "minimum": 1,
     "description": "Number of records per page (max 1000)"
    }
   },
   "description": "Pagination parameters for API requests."
  }
 },
 "description": "Request for PnL by address endpoint.",
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "PnlByAddressResponse",
 "required": [
  "data"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "PnlByAddressItem",
    "properties": {
     "address": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Address",
      "description": "Trader address (hex)"
     },
     "event_id": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Event Id",
      "description": "Parent event ID"
     },
     "question": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Question",
      "description": "Market question"
     },
     "market_id": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Market Id",
      "description": "Market ID"
     },
     "side_held": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Side Held",
      "examples": [
       "Yes"
      ],
      "description": "Side held (Yes/No)"
     },
     "event_title": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Event Title",
      "description": "Parent event title"
     },
     "total_pnl_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Total Pnl Usd",
      "description": "Total PnL in USD"
     },
     "market_resolved": {
      "anyOf": [
       {
        "type": "boolean"
       }
      ],
      "title": "Market Resolved",
      "description": "Whether market is resolved"
     },
     "net_buy_cost_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Net Buy Cost Usd",
      "description": "Net buy cost in USD"
     },
     "redemption_value_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Redemption Value Usd",
      "description": "Redemption value in USD"
     },
     "unrealized_value_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Unrealized Value Usd",
      "description": "Unrealized value in USD"
     },
     "net_sell_proceeds_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Net Sell Proceeds Usd",
      "description": "Net sell proceeds in USD"
     }
    },
    "description": "PnL by address data from ch_api_pm_pnl_by_address."
   },
   "title": "Data",
   "description": "L
… (truncated)
```

## More

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