# onchain-tx-explain

> onchain-tx-explain is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.012/call, status unknown (last checked 2026-09-14).

Returns a plain-language explanation of an EVM transaction by hash, including net token movements per participant, operation type, protocol labels, gas costs in native and USD, and a readable summary — across 12 EVM networks.

## Facts

- Endpoint: GET https://api.agentstools.dev/tx/explain
- Price: $0.012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-tx-explain-04255ae1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iZJwRb2kz3mHpVjAftJFh

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 onchain-tx-explain-04255ae1
```

Example prompt: Can you explain what happened in this Ethereum transaction — 0x4a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b — including what tokens moved, what kind of operation it was, and how much it cost in gas?

## When to prefer this

Choose this endpoint when you need a human-readable, multi-dimensional breakdown of a specific EVM transaction — not just raw decoded calldata, but interpreted meaning including net token flows, operation classification, protocol identification, and USD gas costs. Prefer this over raw RPC calls when your agent or user needs to understand what a transaction actually did in plain English across 12 supported networks including Base, Ethereum, Arbitrum, Optimism, Polygon, BNB, and others.

## Known failure modes

- Invalid or malformed transaction hash returns an error (must be 0x + 64 hex characters)
- Transaction hash not found on the specified network returns a not-found error
- Unsupported network name returns a validation error (must be one of the 12 supported EVM networks)
- Very complex transactions with many log events may have incomplete token movement attribution
- Pending or unconfirmed transactions may not be resolvable
- USD gas price conversion may be slightly delayed relative to real-time spot price

## How this service works

Plain-language explanation of an EVM transaction by hash across 12 networks: net token movements per participant (ERC-20, ERC-721, ERC-1155, native, WETH), the operation type (swap, transfer, approve, mint, deploy, wrap, and more), protocol labels, gas in native plus USD, and a readable summary.

## Output

A structured JSON response containing: the operation type (swap, transfer, approve, mint, deploy, wrap, etc.), net token movements per participant broken down by token standard (ERC-20, ERC-721, ERC-1155, native, WETH), protocol labels identifying the DeFi protocols involved, gas cost in both native token and USD, and a human-readable plain-language summary of the entire transaction.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hash"
     ],
     "properties": {
      "hash": {
       "type": "string",
       "description": "Transaction hash (0x + 64 hex characters)"
      },
      "network": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon",
        "bnb",
        "avalanche",
        "gnosis",
        "linea",
        "scroll",
        "celo",
        "mantle"
       ],
       "type": "string",
       "description": "EVM network to read from (default base)"
      }
     }
    }
   },
   "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/onchain-tx-explain-04255ae1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
