# Lone Star Oracle PnL — EVM Wallet Profit & Loss

> Lone Star Oracle PnL — EVM Wallet Profit & Loss is a paid API for AI agents from pnl.lonestaroracle.xyz, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-13).

Returns per-token realized and unrealized PnL, cost basis, and portfolio profit/loss for any EVM wallet address over a configurable lookback period

## Facts

- Endpoint: GET https://pnl.lonestaroracle.xyz/pnl
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lone-star-oracle-pnl-evm-wallet-profit-loss-44ea65fc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EdnM1uE0-Ilc_vAWc8RYj

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 lone-star-oracle-pnl-evm-wallet-profit-loss-44ea65fc
```

Example prompt: Can you check the realized and unrealized PnL for wallet 0xAbCd1234...5678 over the last 90 days, broken down by token?

## When to prefer this

Use this endpoint when you need on-chain realized and unrealized PnL with cost basis for any EVM-compatible wallet, especially when you need per-token granularity over a custom time window. Prefer this over generic portfolio trackers when cost basis accuracy and EVM compatibility are priorities and you need a pay-per-call model without subscription overhead.

## Known failure modes

- Invalid or malformed wallet address returns an error response
- Lookback period outside 1–365 days range is rejected with a validation error
- Wallet with no transaction history may return empty or zero PnL data
- Payment not provided or insufficient USDC (0.2 USDC required) results in 402 Payment Required
- Network or indexer downtime may cause delayed or unavailable data

## How this service works

Wallet realized and unrealized PnL — per-token profit and loss and cost basis for any EVM address

## Output

A JSON object containing per-token profit and loss metrics for the queried EVM wallet, including realized PnL (gains/losses from completed trades), unrealized PnL (open position gains/losses), and cost basis figures, computed over the specified lookback window.

## Request schema (JSON Schema)

```json
{
 "tags": [
  "wallet",
  "pnl",
  "profit",
  "portfolio",
  "evm"
 ],
 "type": "object",
 "category": "data",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "days": {
       "type": "integer",
       "title": "Days",
       "default": 30,
       "maximum": 365,
       "minimum": 1,
       "description": "Lookback period in days"
      },
      "wallet": {
       "type": "string",
       "title": "Wallet",
       "description": "Base wallet address (0x...)"
      },
      "address": {
       "type": "string",
       "title": "Address",
       "description": "Alias for wallet"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lone-star-oracle-pnl-evm-wallet-profit-loss-44ea65fc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pnl.lonestaroracle.xyz](https://www.zero.xyz/host/pnl.lonestaroracle.xyz/llms.txt)
