Skip to content

Profit and Loss API

Realized and unrealized profit per token from the wallet's own trades over the last N days.

GET/v1/crypto/wallet/:wallet/pnl

You send

  • wallet The wallet's address: a Solana address, or a 0x address on an EVM chain

+ 2 optional: chain, days

You get back

JSON with these fields, inside data:

wallet, days, since_at, realized_usd, unrealized_usd, total_usd, …

Example and every field explained ↓

It costs

$0.005 / call

The first 100 priced calls a day are free on every key.

Freshness
up to 15 s old
Auth
Bearer key
Chains
4 chains
curl "https://api.crypto2api.com/v1/crypto/wallet/7KZHexZyoDdrGi5S2FNAB3XNKKXJ6dLpSXLnBw8f9ESx/pnl?chain=solana&days=7" \
  -H "Authorization: Bearer c2a_your_key"

Swap in your key for c2a_your_key. No key yet? curl -X POST https://api.crypto2api.com/v1/keys makes one, free, no sign-up, or just press Run below.

Used forTrack a wallet

Works on 4 chains. Pass chain=; it defaults to solana. Pick one in the playground and the cURL, JavaScript, Python and MCP snippets all follow it.

  • solana
  • ethereum
  • avalanche
  • mantle

Parameters

Required first. Each example is a value that works.

Response

Every answer is { data, cost_usd, balance_usd, cached, request_id }. Below is a real data from this endpoint, read when the page was built.

Example data

"wallet": "7KZHexZyoDdrGi5S2FNAB3XNKKXJ6dLpSXLnBw8f9ESx",
"chain": "solana",
"days": 7,
"since_at": "2026-11-21T22:21:31.000Z",
"realized_usd": -0.21,
"unrealized_usd": 82.25,
"total_usd": 82.04,
"mint": "4ec7Lf7JuCYQVQnUJCzpW5YvaPMNEAeqDRwGcU5n9GGJ",
"symbol": "SATOSHI",
"buys": 5,
"sells": 0,
"bought": 6757851.824907,
"sold": 0,
"cost_usd": 439.68,
"proceeds_usd": 0,
"avg_buy_usd": 0.00006506167777200866,
"price_usd": 0.00007751,
"realized_usd": 0,
"unrealized_usd": 84.12
},
"mint": "Ce2gx9KGXJ6C9Mp5b5x1sn9Mg87JwEbrQby4Zqo3pump",
"symbol": "neet",
"buys": 4,
"sells": 0,
"bought": 2050.594427,
"sold": 0,
"cost_usd": 39.7,
"proceeds_usd": 0,
"avg_buy_usd": 0.019362192126683272,
"price_usd": 0.01882,
"realized_usd": 0,
"unrealized_usd": -1.11
}
],
"method": "Average cost. A trade is a transaction where this wallet paid SOL, USDC, USDT and got one other token back, or the reverse. SOL is valued at today's price ($70.36) on both legs, stablecoins at $1; still-held tokens at today's DexScreener price. Fees are not counted.",
"transactions_read": 34,
"transactions_in_window": 128,
"trades": 24,
"complete": false,
"oldest_read_at": "2026-11-22T17:24:52.000Z"
},
"note": "86 transactions could not be read from the Solana RPC this time (throttled) and are not counted; ask again in a moment. Only the newest 120 transactions of the window were read, back to 2026-11-22: profit before that is not counted. Ask for fewer days to cover the whole window. 2 tokens were sold beyond what the window bought (coins bought earlier): that part realises nothing here, since its cost is not known."
}

Key fields

walletstring
The wallet address asked about.
daysnumber
Days.
since_atstring
Since, time (ISO 8601, UTC).
realized_usdnumber
Realized, in US dollars.
unrealized_usdnumber
Unrealized, in US dollars.
total_usdnumber
Total, in US dollars.
tokensarray
The list of tokens; each item has the fields shown.
methodstring
Method.
coverageobject
Coverage: transactions read, transactions in window, trades, complete….
chainstring
Which chain this answer is for.
1 more fields
notestring
A plain sentence about how to read this answer.
The wrapper every answer comes in
data
The answer itself: the example above.
cost_usd
What this one call was charged — 0 while you are inside the free 100 a day.
balance_usd
What is left on the key after it.
cached
true means another caller asked first, so the answer may be up to 15 s old.
request_id
Quote this if you report something; it is on your Activity page too.

A fact the API could not read is left out or named, never estimated. When an upstream is down you get a 503 with a stable code you can branch on, not a half-filled answer.

Try it

A real call against the live API. The first 100 priced calls a day are free.

Response

"wallet": "7KZHexZyoDdrGi5S2FNAB3XNKKXJ6dLpSXLnBw8f9ESx",
"chain": "solana",
"days": 7,
"since_at": "2026-11-21T22:21:31.000Z",
"realized_usd": -0.21,
"unrealized_usd": 82.25,
"total_usd": 82.04,
"mint": "4ec7Lf7JuCYQVQnUJCzpW5YvaPMNEAeqDRwGcU5n9GGJ",
"symbol": "SATOSHI",
"buys": 5,
"sells": 0,
"bought": 6757851.824907,
"sold": 0,
"cost_usd": 439.68,
"proceeds_usd": 0,
"avg_buy_usd": 0.00006506167777200866,
"price_usd": 0.00007751,
"realized_usd": 0,
"unrealized_usd": 84.12
},
"mint": "Ce2gx9KGXJ6C9Mp5b5x1sn9Mg87JwEbrQby4Zqo3pump",
"symbol": "neet",
"buys": 4,
"sells": 0,
"bought": 2050.594427,
"sold": 0,
"cost_usd": 39.7,
"proceeds_usd": 0,
"avg_buy_usd": 0.019362192126683272,
"price_usd": 0.01882,
"realized_usd": 0,
"unrealized_usd": -1.11
}
],
"method": "Average cost. A trade is a transaction where this wallet paid SOL, USDC, USDT and got one other token back, or the reverse. SOL is valued at today's price ($70.36) on both legs, stablecoins at $1; still-held tokens at today's DexScreener price. Fees are not counted.",
"transactions_read": 34,
"transactions_in_window": 128,
"trades": 24,
"complete": false,
"oldest_read_at": "2026-11-22T17:24:52.000Z"
},
"note": "86 transactions could not be read from the Solana RPC this time (throttled) and are not counted; ask again in a moment. Only the newest 120 transactions of the window were read, back to 2026-11-22: profit before that is not counted. Ask for fewer days to cover the whole window. 2 tokens were sold beyond what the window bought (coins bought earlier): that part realises nothing here, since its cost is not known."
}

What this example answered when the page was built, shortened. Run it for a live answer.

Copy it

Runs as-is, with your key in place of c2a_your_key. It follows the boxes above, on Solana.

curl "https://api.crypto2api.com/v1/crypto/wallet/7KZHexZyoDdrGi5S2FNAB3XNKKXJ6dLpSXLnBw8f9ESx/pnl?chain=solana&days=7" \
  -H "Authorization: Bearer c2a_your_key"

Related

More in Wallets

All endpoints →