# EVM Ledger Net Balance (No Cost-Basis Matching)

> EVM Ledger Net Balance (No Cost-Basis Matching) is a paid API for AI agents from evm-canon-base.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes net asset positions directly from raw trade/ledger data without any cost-basis lot matching, handling broken or unreconcilable ledgers

## Facts

- Endpoint: POST https://evm-canon-base.onrender.com/lots/balances
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-ledger-net-balance-no-cost-basis-matching-3fdc0973
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vA-mgBvhEYUFlsSXWqvlZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability evm-ledger-net-balance-no-cost-basis-matching-3fdc0973 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Net position per asset straight from the trades, with no cost-basis matching — works on ledgers too broken to match

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-ledger-net-balance-no-cost-basis-matching-3fdc0973/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from evm-canon-base.onrender.com](https://www.zero.xyz/host/evm-canon-base.onrender.com/llms.txt)
