# Allium Wallet PnL

> Allium Wallet PnL is a paid API for AI agents from agents.allium.so, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Calculates realized and unrealized profit and loss for a given blockchain wallet address

## Facts

- Endpoint: POST https://agents.allium.so/api/v1/developer/wallet/pnl
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agents-allium-so-acf642f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ip-m2c1FYzf4033zC_3Pz

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 agents-allium-so-acf642f2 -d '<json body>'
```

Example prompt: What's the profit and loss for my Ethereum wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045? I want to see both realized and unrealized PnL.

## When to prefer this

Use this endpoint when you need computed PnL figures for a wallet rather than raw transaction history or balances alone. Prefer this over manually calculating gains from transaction history endpoints when you want ready-to-use realized/unrealized profit metrics for a specific address.

## Known failure modes

- Invalid or malformed wallet address returns 400 error
- Unsupported chain or network returns an error
- Wallet with no transaction history may return empty or zero PnL
- Payment failure (insufficient USDC balance) returns 402
- Rate limiting or quota exceeded returns 429

## How this service works

Get wallet profit and loss

## Output

Returns a breakdown of realized and unrealized profit and loss for the specified wallet, including token-level performance data showing gains and losses across trades and current holdings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "chain",
      "address"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "Blockchain network (e.g. ethereum, solana, base)"
      },
      "address": {
       "type": "string",
       "description": "Wallet address"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "chain": "ethereum",
    "tokens": [
     {
      "raw_balance": "1500000000000000000",
      "average_cost": {
       "amount": "2400.00",
       "currency": "USD",
       "decimals": 18
      },
      "realized_pnl": {
       "amount": "1200.00",
       "currency": "USD",
       "decimals": 18
      },
      "current_price": {
       "amount": "2500.50",
       "currency": "USD",
       "decimals": 18
      },
      "token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "unrealized_pnl": {
       "amount": "150.75",
       "currency": "USD",
       "decimals": 18
      },
      "current_balance": {
       "amount": "3750.75",
       "currency": "USD",
       "decimals": 18
      }
     }
    ],
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "total_balance": {
     "amount": "3750.75",
     "currency": "USD",
     "decimals": 18
    },
    "total_realized_pnl": {
     "amount": "1200.00",
     "currency": "USD",
     "decimals": 18
    },
    "total_unrealized_pnl": {
     "amount": "150.75",
     "currency": "USD",
     "decimals": 18
    }
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-allium-so-acf642f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.allium.so](https://www.zero.xyz/host/agents.allium.so/llms.txt)
