Portfolio

Realized and open PnL per token

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.

get/portfolio/{wallet}/pnl

Request

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

Path parameters

walletstring required

EVM address, hex, case-insensitive.

Query parameters

chain'5042' | '4663' | '143' | 'all'

One chain, or all to merge chains with a byChain breakdown.

Response

realizednumber
unrealizednumber
totalnumber
exitedWithoutSaleobject

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.

byChainobject

Only with chain=all.

updatedAtinteger

Unix time, milliseconds — when the server built this answer.

Changes

No recorded changes to this operation across all 2 revisions of this API.