---
title: "Get wallet set PnL"
method: GET
path: "/v1/wallet-sets/pnl"
tags: ["wallet sets"]
---

# Get wallet set PnL

`GET /v1/wallet-sets/pnl`

This endpoint returns the Profit and Loss (PnL) details of a wallet set.
A wallet set is represented by an EVM address, a Solana address, or both. At least one address must be provided.
This includes Unrealized PnL, Realized PnL, Net Invested amounts and filters for asset categories like Non Fungible Tokens (NFTs).
It uses the FIFO (First In, First Out) standard for calculations, providing accurate insights into wallet set performance.
Ideal for tracking and analyzing financial outcomes of wallet activity across multiple addresses.

The very first request for a wallet set might result in a 503 which should be retried later.
Wallet sets with over 1 million transactions are not supported.

## Query parameters

- `addresses` string[], required
- `currency` 'eth' | 'btc' | 'usd' | 'eur' | 'krw' | 'rub' | 'gbp' | 'aud' | 'cad' | 'inr' | 'jpy' | 'nzd' | 'try' | 'zar' | 'cny' | 'chf'
- `filter[chain_ids]` string[]
- `filter[fungible_ids]` string[]
- `filter[fungible_implementations]` string[]
- `since` string
- `till` string

## Response `200`

Response for requested wallet set PnL

- Response8
  - `links` ResponseLinks8, required
    - `self` string, url, required
  - `data` Container11, required
    - `type` 'pnl', required — Resource type
    - `id` string, required — Wallet set PNL unique ID
    - `attributes` Attributes2, required
      - `total_gain` number, float — Total Gain. The sum of realized and unrealized gains across all fungible assets, calculated using the FIFO (First In, First Out) method.
      - `realized_gain` number, float — Realized Gain. The gain (or loss) realized from the sale of fungible assets, calculated using the FIFO (First In, First Out) method (the earliest purchases are matched with the earliest sales). The cost basis of the oldest assets is subtracted from the sale proceeds.
      - `unrealized_gain` number, float — Unrealized Gain. The potential gain (or loss) on unsold fungible assets, calculated as the difference between their current market value and cost basis using the FIFO method (the earliest purchases are matched with the earliest sales).
      - `relative_total_gain_percentage` number, float — Relative Total Gain Percentage. The percentage return on total investment, combining both realized and unrealized gains.
      - `relative_realized_gain_percentage` number, float — Relative Realized Gain Percentage. The percentage return on realized trades, calculated as realized gain divided by realized cost basis.
      - `relative_unrealized_gain_percentage` number, float — Relative Unrealized Gain Percentage. The percentage return on open positions, calculated as unrealized gain divided by the current cost basis of held assets.
      - `total_fee` number, float — Total Fees Paid. The sum of all transaction fees associated with asset trades.
      - `total_invested` number, float — Total Invested Amount. The total amount invested in fungible assets (sum of all buy transactions), calculated using the FIFO method.
      - `realized_cost_basis` number, float — Realized Cost Basis. The cost basis of closed (sold) positions, calculated using the FIFO method.
      - `net_invested` number, float — Net Invested Amount. The total amount invested in fungible assets that have not been sold, calculated using the FIFO method (the earliest purchases are matched with the earliest sales).
      - `received_external` number, float — Received Amount from Other Wallets. The cumulative value of all fungible assets received from other wallets. Note: This value does not include amounts traded internally within the wallet but does include `received_for_nfts`.
      - `sent_external` number, float — Sent Amount to Other Wallets. The cumulative value of all fungible assets sent to other wallets. Note: This value does not include amounts traded internally within the wallet but does include `sent_for_nfts`.
      - `sent_for_nfts` number, float — Sent Amount for NFTs. The cumulative value of all fungible assets sent in transactions where the wallet receives NFTs.
      - `received_for_nfts` number, float — Received Amount for NFTs. The cumulative value of all fungible assets received in transactions where the wallet sends NFTs.
      - `breakdown` Breakdown — Detailed PnL breakdown by individual fungibles. Contains per-fungible statistics keyed either by fungible ID or by implementation (chain:address pair). Only returned when the request includes filters for fungibles (fungible_ids or fungible_implementations).
        - `by_id` object — PnL statistics broken down by fungible ID.
        - `by_implementation` object — PnL statistics broken down by fungible implementation (chain:address pair).
  - `meta` object — Metadata about the PnL calculation (only present when assets were excluded from the calculation). The structure matches the filter type used in the request: - When filtering by `fungible_ids`, the meta contains an `excluded_fungible_ids` array - When filtering by `fungible_implementations`, the meta contains an `excluded_fungible_implementations` array - If both filters are used, both fields may appear in the meta
    - `excluded_fungible_ids` string[] — Fungible asset IDs that were excluded due to missing prices (only present when the request used fungible_ids filter)
    - `excluded_fungible_implementations` string[] — Asset implementations that were excluded due to missing prices (only present when the request used fungible_implementations filter). Format matches the user's query format: "chain:address" for regular tokens, "chain:" for base assets.

## Other responses

- `400` — Parameters are malformed
- `401` — Unathenticated request
- `429` — Too many requests error
- `503` — Service is temporarily unavailable

---

[API](https://skmtc.dev/zerion/apis/rest-api.md) · [All operations](https://skmtc.dev/zerion/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zerion/rest-api/revisions/2ef116ef914f/schema)
