# EVM Canon Trade Ledger Validator

> EVM Canon Trade Ledger Validator is a paid API for AI agents from evm-canon-base.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Validates a trade ledger and reports all problems at once: unmatched sells, duplicate entries, bad numeric values, and invalid timestamps.

## Facts

- Endpoint: POST https://evm-canon-base.onrender.com/lots/validate
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-canon-trade-ledger-validator-aa8b8ee7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OaAETh0XOROBtg_VFCnGi

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-canon-trade-ledger-validator-aa8b8ee7 -d '<json body>'
```

Example prompt: Can you validate my trade ledger and flag every issue you find — unmatched sells, duplicate trades, bad numbers, or invalid timestamps — all at once before I run any cost-basis calculations?

## When to prefer this

Use this endpoint as the first step before any cost-basis or gain/loss calculation. It catches all data quality issues in a single call — unmatched sells, duplicates, bad numbers, and bad timestamps — rather than discovering them one at a time when downstream calculations fail. Prefer it over manual inspection or per-field validators when you need a comprehensive, multi-error audit of an entire ledger in one pass.

## Known failure modes

- Malformed request body returns a 400 with a schema validation error
- Empty or missing trades array results in an error or empty report
- Payment not attached or insufficient USDC causes a 402 Payment Required response
- Extremely large ledgers may time out if the Render.com instance is cold-starting
- Partial or truncated data may produce false-positive unmatched-sell errors

## How this service works

Every problem in a trade ledger reported at once: unmatched sells, duplicates, bad numbers and timestamps

## Output

A structured report listing every detected problem in the trade ledger: unmatched sell events (disposals with no matching acquisition lot), duplicate trade entries, invalid or out-of-range numeric values, and malformed or out-of-sequence timestamps. Each issue is described with enough context to locate and fix it.

## 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-canon-trade-ledger-validator-aa8b8ee7/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)
