---
title: "Realized and open PnL per token"
method: GET
path: "/portfolio/{wallet}/pnl"
tags: ["Portfolio"]
---

# Realized and open PnL per token

`GET /portfolio/{wallet}/pnl`

## Request

- Base URL: `https://api.getchord.xyz/v1`
- URL: `https://api.getchord.xyz/v1/portfolio/{wallet}/pnl`
- Auth: none declared

Average-cost PnL for one wallet from the tape: realized on sells, unrealized on what is still held at current prices, ROI, and the untracked balance that arrived by transfer (no cost basis, excluded from PnL). Cached with stale-while-revalidate (a day-old answer beats a $0 skeleton).

Portfolio routes answer an empty 200 shape rather than a 5xx when the tape read fails — treat an empty `tokens` list as "nothing yet" and retry later.

## Path parameters

- `wallet` string, required: EVM address, hex, case-insensitive.

## Query parameters

- `chain` '5042' | '4663' | '143' | 'all'

## Response `200`

- object
  - `tokens` PnlToken[]
    - `token` string: EVM address, hex, case-insensitive.
    - `symbol` string, nullable
    - `logo` string, nullable
    - `realizedUsd` number
    - `unrealizedUsd` number
    - `totalUsd` number
    - `costRemaining` number
    - `curValue` number
    - `curAmount` number
    - `avgCost` number: Average cost per token, USD.
    - `roiPct` number, nullable
    - `untrackedAmount` number: Balance that arrived by transfer (no cost basis).
    - `untrackedValue` number
  - `realized` number
  - `unrealized` number
  - `total` number
  - `exitedWithoutSale` object: Present when bought quantity left the wallet with no sale on the tape (a transfer out, or a sale credited to another address): `{tokens, costUsd, top: [{symbol, costUsd}]}`. Its result is unknown and NOT in the PnL above.
  - `byChain` object: Only with `chain=all`.
  - `updatedAt` integer: Unix time, milliseconds — when the server built this answer.

## Other responses

- `400`: Invalid parameters — `error` names the check that failed (`INVALID_PARAMS`, `BAD_ADDRESS`, `BAD_LIMIT`, `BAD_HOURS`, …).

---

[API](https://skmtc.dev/getchord/apis/chord-api.md) · [All operations](https://skmtc.dev/getchord/apis/chord-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getchord/apis/chord-api/revisions/d3bc4640fea0?raw)
