---
title: "List wallet unrealized gains and losses"
method: GET
path: "/v1/portfolios/{portfolioSlug}/wallets/unrealized-gains"
tags: ["Portfolios"]
---

# List wallet unrealized gains and losses

`GET /v1/portfolios/{portfolioSlug}/wallets/unrealized-gains`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/wallets/unrealized-gains`
- Auth: API key in header `x-api-key`

## Path parameters

- `portfolioSlug` string, required

## Query parameters

- `pageSize` integer: Requested number of resources to return. Oversized values are clamped to the route limit.
- `pageToken` string: Opaque token returned by the previous list response.

## Response `200`

- WalletUnrealizedGainsListResponseDto
  - `data` object[], required
    - `wallet` object, required
      - `chainId` string, required: Chain ID
      - `walletAddress` string, required: Wallet address
    - `value` string, nullable, required: Wallet market value in the portfolio base currency: liquid holdings and DeFi positions at each asset's one current unit price, spam hidden; null when no holding of the wallet can be valued
    - `unrealizedGainLoss` string, nullable, required: Wallet value less the cost basis of the lots the wallet holds; null when the portfolio pools cost basis across wallets, or when the wallet holds an asset whose cost basis the Assets page withholds, or when none of the wallet's holdings has both a known value and a cost basis
  - `pagination` object, required
    - `pageSize` integer, required: Items returned per page.
    - `nextPageToken` string: Opaque token for retrieving the next page.

---

[API](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api.md) · [All operations](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/revisions/180622e6255e?raw)
