> ## Documentation Index
> Fetch the complete documentation index at: https://nexus.gerowallet.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Wallet Analytics

> Holdings, value history, and FIFO P&L per wallet

**Wallet Analytics add-on.** Portfolio-level analytics for any Cardano stake address: current holdings, value over time, and realized/unrealized profit-and-loss computed on a FIFO (first-in, first-out) cost basis.

<Note>
  Endpoints on this page require the **Wallet Analytics** add-on. Without it they return [HTTP 402](/docs/addons/overview#how-access-is-enforced) with `"addon": "walletAnalytics"`.
</Note>

Base URL: `https://nexus.gerowallet.io` · Auth: `X-Api-Key: nxs_…`

## Endpoints

| Method | Path                                  | Description                                      |
| ------ | ------------------------------------- | ------------------------------------------------ |
| GET    | `/api/wallet/{stakeAddress}/holdings` | Current wallet holdings (all assets + ADA)       |
| GET    | `/api/wallet/{stakeAddress}/history`  | Wallet value over time                           |
| GET    | `/api/wallet/{stakeAddress}/pnl`      | Single-wallet realized/unrealized gains & losses |
| POST   | `/api/wallet/pnl`                     | Multi-wallet P\&L (FIFO) in one request          |

## Example

```bash theme={null}
# Single-wallet P&L
curl "https://nexus.gerowallet.io/api/wallet/stake1u9.../pnl" \
  -H "X-Api-Key: nxs_your_api_key_here"

# Multi-wallet P&L
curl -X POST "https://nexus.gerowallet.io/api/wallet/pnl" \
  -H "X-Api-Key: nxs_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "stakeAddresses": ["stake1u9...", "stake1uy..."] }'
```

<Note>
  P\&L is computed FIFO: each disposal is matched against the earliest acquisitions to derive cost basis and realized gains. Holdings still held are marked to current market price for unrealized P\&L.
</Note>

Full request/response schemas are in the [API Reference](/docs/api-reference).
