Returns a PnL summary for a non-empty list of payment key hashes (wallets) and a single asset. The response may be null when the service has no PnL data to return.
Auth: Public
POST requests must send Content-Type: application/json. The first input in the Tapir definition is that content type; the route handler only uses the asset id and JSON body.
Query parameters
Cardano asset ID (policyId.hexAssetName).
Request body
JSON array of 56-character hex payment key hashes (at least one element).
["e62df682e62df682e62df682e62df682e62df682e62df682e62df682e62df682e62"]
Response
200 with a JSON object or null.
Serialized asset ID (policyId.assetName).
PnL as a percent (e.g. 15.50 for 15.50%), scaled to 2 decimal places.
Total ADA invested (decimal string, 6 fractional digits).
Current total ADA gain (realized + unrealized), decimal string (6 fractional digits).
curl --request POST \
--url "https://analytics.snek.fun/balances/v1/user/pnl-card?assetId=fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645" \
--header "Content-Type: application/json" \
--data '["e62df682e62df682e62df682e62df682e62df682e62df682e62df682e62df682e62"]'
{
"asset": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"pnlPercent": "12.34",
"investedAda": "100.000000",
"currentAdaGain": "15.500000"
}