Skip to Content
Blockhash Docs
API referenceWallets
GET
/v1/wallets/{address}/pnl

Per token, the wallet's cost basis at average cost and its realized and unrealized profit, each transfer priced at its day's close. Only tokens with $1,000 of 2% depth and known decimals count. Native ether is one row under the zero address, at wrapped ether's close, with no cost or profit.

Path Parameters

address*string

A 20-byte hex address.

Match^0x[0-9a-fA-F]{40}$

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/wallets/string/pnl"
{  "address": "string",  "source": "indexer",  "truncated": true,  "nativeUnread": true,  "perps": {    "state": "read",    "equityUsd": 0,    "unrealizedUsd": 0,    "accounts": 0,    "positions": 0,    "readAt": 0,    "partial": true,    "retryAfterSec": 0  },  "totals": {    "costBasisUsd": 0,    "valueUsd": 0,    "unrealizedUsd": 0,    "realizedUsd": 0  },  "tokens": [    {      "token": "string",      "symbol": "string",      "decimals": 0,      "balance": "string",      "costBasisUsd": 0,      "valueUsd": 0,      "unrealizedUsd": 0,      "realizedUsd": 0,      "avgCostUsd": 0,      "estimated": true,      "firstDay": "string",      "native": true    }  ]}