{"uid":"cap_EErwbBCmP30rwj_jsvspJ","slug":"evm-canon-base-gains-summary-fifo-default-c5f01d56","name":"EVM Canon Base – Gains Summary (FIFO/Default)","description":"Realized gain/loss summary per disposal plus totals, without lot-level detail","url":"https://evm-canon-base.onrender.com/lots/gains","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["trades"],"properties":{"method":{"enum":["FIFO","LIFO","HIFO","ACB"],"type":"string","default":"FIFO"},"trades":{"type":"array","items":{"type":"object","required":["side","asset","amount","price","time"],"properties":{"fee":{"type":"string"},"side":{"enum":["buy","sell"],"type":"string"},"time":{"description":"unix seconds/millis or ISO-8601"},"asset":{"type":"string"},"price":{"type":"string","description":"unit price in the quote currency"},"amount":{"type":"string","description":"decimal string, never a float"}}}}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"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":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Hq__kiyrhbPAmakaGE1DG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes realized gain/loss summary per disposal event plus aggregate totals using default cost-basis matching, without exposing individual lot-level detail","exampleAgentPrompt":"Can you compute the realized gain and loss summary for my EVM token disposals and give me the totals — I just want the per-disposal summary without the individual lot breakdown?","exampleUseCases":[{"title":"Year-end crypto tax summary","prompt":"I need a realized gains and losses summary for all my token disposals this year — just the per-disposal totals and the overall net figure, no lot-level detail needed."},{"title":"Quick P&L check after token sales","prompt":"I just sold some tokens from my wallet — can you calculate the realized gain or loss on those disposals and tell me the totals so I know my tax position?"},{"title":"DeFi portfolio gains reporting","prompt":"Can you summarize my realized gains and losses from all my on-chain swap and disposal events so I have a clean gains report I can hand off to my accountant?"}],"resultDescription":"Returns a list of disposal events each annotated with realized gain or loss (proceeds minus cost basis), plus aggregate totals: total realized gain, total realized loss, and net realized gain/loss. No individual lot-level detail is included — only the per-disposal roll-up and summary totals.","failureModes":["Missing or malformed trade history input returns a 400 validation error","Disposals with no matching acquisition lots may produce zero or error results","Ambiguous token identifiers cause cost-basis lookup failures","Insufficient funds for the $0.03 USDC x402 payment returns a 402 Payment Required","Large trade histories may time out on the render.com free tier (cold start latency)"],"whenToPreferThis":"Choose this endpoint when you need a clean, high-level realized gains summary per disposal plus overall totals and do not need to see which specific lots were consumed. It is simpler than the HIFO or average-cost endpoints when the default (typically FIFO) matching method is acceptable, and faster to interpret than lot-level detail endpoints. Prefer this for tax reporting, quick P&L checks, or passing summarized gain/loss figures to a downstream system without raw lot data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:50:24.604Z","isFirstParty":false}