{"name":"wallet-pnl","description":"Computes wallet token P&L with FIFO cost basis for any (wallet, ERC-20, chain) triple. Pulls all transfers from Etherscan v2, prices each one at the historical USD spot via CoinGecko, runs FIFO accounting, and reports cost basis, realized gain, unrealized gain, current balance, and tx count. Capped at the most recent 500 transfers. Use it as a realized + unrealized profit calculator or EVM portfolio analytics tool.","price":"$0.05","method":"POST","input_schema":{"properties":{"wallet":{"type":"string","description":"0x-prefixed 20-byte wallet address."},"token_address":{"type":"string","description":"0x-prefixed 20-byte ERC-20 contract."},"chain":{"type":"string","enum":["base","ethereum","polygon","arbitrum","optimism"],"description":"EVM chain. Default 'ethereum'."}},"required":["wallet","token_address"]},"input_example":{"wallet":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","token_address":"0x4200000000000000000000000000000000000006","chain":"ethereum"},"output_example":{"wallet":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","token":"0x4200000000000000000000000000000000000006","chain":"ethereum","symbol":"WETH","decimals":18,"tx_count":134,"transfers_in":412.13,"transfers_out":290.6,"current_balance":121.53,"current_price_usd":3284.13,"cost_basis_usd":312421.55,"realized_pnl_usd":142900.31,"unrealized_pnl_usd":86412.13,"total_pnl_usd":229312.44,"capped_at":null,"coingecko_id":"weth","source":"etherscan + coingecko"},"x402_payment_required":true,"x402_facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}