{"uid":"cap_vA-mgBvhEYUFlsSXWqvlZ","slug":"evm-ledger-net-balance-no-cost-basis-matching-3fdc0973","name":"EVM Ledger Net Balance (No Cost-Basis Matching)","description":"Net position per asset straight from the trades, with no cost-basis matching — works on ledgers too broken to match","url":"https://evm-canon-base.onrender.com/lots/balances","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":{"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.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_thFp40Qc0tycEywjD_dlH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes net asset positions directly from raw trade/ledger data without any cost-basis lot matching, handling broken or unreconcilable ledgers","exampleAgentPrompt":"Look at these raw EVM trade records for my Base wallet and give me the net balance for each asset — don't try to match cost-basis lots, just sum the inflows and outflows per token, even if the ledger is messy and can't reconcile properly.","exampleUseCases":[{"title":"Broken ledger quick position check","prompt":"I have a bunch of EVM trade records from my Base wallet but the ledger is too fragmented to reconcile properly — can you just sum up the net inflows and outflows per token and tell me what I hold in each asset without trying to do any lot matching?"},{"title":"DeFi portfolio snapshot without tax tracking","prompt":"Just give me a raw net balance per token from my trading history on Base — I don't need cost-basis or gains, just a clean summary of how much of each asset I'm net long or short based on all the trades."},{"title":"Pre-reconciliation sanity check","prompt":"Before I try to do any tax lot matching, can you compute the simple net positions per asset from my EVM ledger entries so I can sanity-check the totals — just pure inflows minus outflows per token, no lot tracking needed?"}],"resultDescription":"Returns a list of net asset balances, one entry per token/asset, computed by summing all inflows and outflows from the provided trade or ledger records — no cost-basis assignment or lot matching is performed. Each entry includes the asset identifier and net quantity held.","failureModes":["Malformed or missing trade records result in an error or empty balances","Unsupported token formats or decimal mismatches may cause incorrect aggregation","Ledger entries with ambiguous asset identifiers may be grouped incorrectly or dropped","Payment not included or insufficient USDC causes 402 rejection"],"whenToPreferThis":"Choose this endpoint when you need a fast, simple net-position snapshot from raw trade data and cost-basis lot matching is either unnecessary or impossible due to ledger gaps. Prefer it over FIFO/HIFO/ACB endpoints when the goal is a balance summary rather than realized-gain computation, or when the ledger is too broken to support lot matching.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:40:47.495Z","isFirstParty":false}