{"uid":"cap_Q7c5h8_PwheEWMgmCj_e8","slug":"defi-shield-hazel-vercel-app-97a63aa5","name":"DeFi Shield Wallet PnL Calculator","description":"","url":"https://defi-shield-hazel.vercel.app/api/wallet/pnl","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"properties":{"address":{"type":"string","description":"Wallet address for PnL analysis (0x + 40 hex chars)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"address":"0x1234567890123456789012345678901234567890"},"type":"http","method":"POST","bodyType":"json"}},"response":{"data":{"note":"No token transactions found for this wallet.","address":"0x1234567890123456789012345678901234567890","tokens_held":[],"gas_spent_eth":0,"tokens_exited":[],"top_performers":[],"response_time_ms":127,"estimated_pnl_usd":0,"total_tokens_traded":0},"success":true}},"exampleRequest":{"address":"0x1234567890123456789012345678901234567890"},"tags":["x402"],"displayCostAmount":"1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jljB8ukUy-7a3Cuw_JLXZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates profit and loss breakdown per token for a given wallet address","exampleAgentPrompt":"What's the profit and loss breakdown per token for wallet 0xAbc123...? I want to see exactly which tokens I've made money on and which I've lost money on.","exampleUseCases":null,"resultDescription":"Returns a per-token breakdown of profit and loss for the specified wallet, including realized and unrealized gains/losses for each token held or traded.","failureModes":["Invalid or malformed wallet address returns an error","Wallet with no transaction history may return empty or zero PnL","Network errors or blockchain RPC timeouts may cause failures","Payment of $1 USDC required per call — failure to pay returns 402","Unsupported chain or token may result in incomplete data"],"whenToPreferThis":"Use this endpoint when you need a detailed, per-token profit and loss breakdown for a specific wallet address — particularly useful for DeFi portfolio auditing, tax reporting prep, or performance analysis. Prefer this over generic portfolio trackers when you need structured PnL data programmatically per token.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:37:19.226Z","isFirstParty":false}