{"uid":"cap_cmhgZ8W1X0m3QKoFZ14aA","slug":"spraay-crypto-tax-calculator-fifo-0223d64c","name":"Spraay Crypto Tax Calculator (FIFO)","description":"Calculate crypto tax gain/loss using FIFO method.","url":"https://gateway.spraay.app/api/v1/tax/calculate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"transactions":{"type":"array"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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":"$0.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0wyVmNf5OC2-5DpDKdAX0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates cryptocurrency capital gains and losses from a list of transactions using the FIFO (first-in, first-out) cost basis method.","exampleAgentPrompt":"Can you calculate my crypto capital gains and losses using FIFO? Here are my transactions: I bought 1 BTC at $20,000 in January, bought 0.5 BTC at $25,000 in March, and sold 1.2 BTC at $30,000 in November.","exampleUseCases":[{"title":"Year-end crypto tax filing","prompt":"I need to figure out my capital gains and losses for this tax year. I have a list of all my crypto buys and sells — can you run the FIFO calculation so I know what to report to the IRS?"},{"title":"DeFi portfolio tax reconciliation","prompt":"I've been trading on DeFi platforms all year and have dozens of swap transactions. Can you calculate my net gain or loss on all of them using the FIFO method so I can hand the numbers to my accountant?"},{"title":"Mid-year tax liability check","prompt":"Before I sell any more crypto, I want to know my current taxable gains so far this year. Here are my transaction records — can you compute my realized gain or loss using FIFO?"}],"resultDescription":"Returns calculated capital gains and losses for each taxable event in the transaction list, using FIFO cost basis methodology. Results typically include realized gain/loss amounts, cost basis per lot, proceeds, and aggregate totals across the provided transactions.","failureModes":["Empty or malformed transactions array returns a validation error","Missing required buy/sell fields (asset, amount, price, date) may cause incomplete calculations","Transactions out of chronological order could produce inaccurate FIFO results","Unsupported asset types or formats may be rejected","Network or payment authorization failure returns a 402 or 5xx error"],"whenToPreferThis":"Choose this endpoint when you need automated, FIFO-based crypto capital gains computation directly from a transaction array, especially within a workflow that already uses the Spraay gateway for payroll, sanctions screening, or wallet intelligence. Best suited for agents handling tax season reporting, accountant data prep, or real-time gain/loss tracking without needing a full tax platform integration.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:47:05.960Z","isFirstParty":false}