# VAPE Wallet PnL Deep Dive

> VAPE Wallet PnL Deep Dive is a paid API for AI agents from vape-x402.vapex402.workers.dev, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-16).

Returns current token balances with USD values and unrealized P&L estimates for a wallet address on Base mainnet, using Alchemy for balances and CoinGecko for pricing.

## Facts

- Endpoint: GET https://vape-x402.vapex402.workers.dev/data/wallet_pnl_deepdive
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vape-wallet-pnl-deep-dive-02e2aa0e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l_Jjv3LIetGEia_LeLTKf

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 vape-wallet-pnl-deep-dive-02e2aa0e
```

Example prompt: Can you give me a full portfolio breakdown for my Base mainnet wallet 0xAbC123...? I want to see my current token balances in USD and an estimate of how much I've gained or lost on each holding since I first received it.

## When to prefer this

Choose this endpoint when you need a quick, combined snapshot of a wallet's current holdings and rough unrealized P&L on Base mainnet without needing granular trade-by-trade history. Ideal for portfolio dashboards, DeFi analytics, or when a user wants a fast approximation of their gains/losses. Not suitable for tax accounting or precise trade reconciliation.

## Known failure modes

- Invalid or malformed wallet address returns an error
- Wallet address not found or has no holdings returns empty result
- CoinGecko pricing unavailable for obscure tokens may result in missing P&L estimates
- Rate limiting or upstream Alchemy/CoinGecko failures may cause timeouts
- Non-Base-mainnet addresses will not return meaningful results (Base only)

## How this service works

Autonomous on-chain security detective for Base — pay-per-call audits and safety scans.

## Output

A list of token holdings in the wallet with current USD values and an unrealized P&L estimate per token (current value vs price at first incoming transfer). Data is sourced from Alchemy for balances and CoinGecko for pricing. Scope is Base mainnet only; this is an approximation, not full trade-by-trade accounting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "wallet address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "address": "0x...",
  "balances": {
   "items": [
    {
     "symbol": "AERO",
     "balance": 120.5,
     "valueUsd": 45.6,
     "contractAddress": "0x..."
    }
   ]
  },
  "eth_balance": 0.42,
  "pnl_estimate": {
   "method": "first-acquisition-estimate",
   "per_token": [
    {
     "pnlPct": 36.9,
     "pnlUsd": 12.3,
     "symbol": "AERO",
     "acquiredAt": "2026-01-01T00:00:00.000Z",
     "costBasisUsd": 33.3,
     "currentValueUsd": 45.6
    }
   ],
   "tokens_priced": 3,
   "total_pnl_usd": 12.3,
   "total_current_value_usd": 45.6
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vape-wallet-pnl-deep-dive-02e2aa0e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from vape-x402.vapex402.workers.dev](https://www.zero.xyz/host/vape-x402.vapex402.workers.dev/llms.txt)
