# EVM Canon Base – Gains Summary (FIFO/Default)

> EVM Canon Base – Gains Summary (FIFO/Default) is a paid API for AI agents from evm-canon-base.onrender.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Computes realized gain/loss summary per disposal event plus aggregate totals using default cost-basis matching, without exposing individual lot-level detail

## Facts

- Endpoint: POST https://evm-canon-base.onrender.com/lots/gains
- Price: $0.03/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-base-gains-summary-fifo-default-c5f01d56
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EErwbBCmP30rwj_jsvspJ

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-base-gains-summary-fifo-default-c5f01d56 -d '<json body>'
```

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

## When to prefer this

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.

## Known failure modes

- 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)

## How this service works

Realized gain/loss summary per disposal plus totals, without lot-level detail

## Output

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.

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-canon-base-gains-summary-fifo-default-c5f01d56/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)
