# Onchain Query API – Transaction Lookup & Decode

> Onchain Query API – Transaction Lookup & Decode is a paid API for AI agents from chain.cyberwarex.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-16).

Looks up and decodes an EVM transaction by hash, returning success/failure status, gas fees in native token and USD, and all ERC-20 transfers with human-readable amounts.

## Facts

- Endpoint: GET https://chain.cyberwarex.com/tx
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-query-api-transaction-lookup-decode-f4386c59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XPg97mymNHe1gw0exatcZ

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-query-api-transaction-lookup-decode-f4386c59
```

Example prompt: Can you look up transaction 0x3a1b2c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890ab on Ethereum and tell me whether it succeeded, who sent it, how much ETH was transferred, what ERC-20 tokens moved, and what the gas fee was in USD?

## When to prefer this

Choose this endpoint when you need a fully decoded, agent-readable breakdown of a specific EVM transaction — including fee in USD and ERC-20 transfer semantics — across Base, Ethereum, Arbitrum, Optimism, or Polygon. Prefer it over raw RPC calls when you need human-readable amounts and USD fee conversion without writing your own ABI decoding logic. The graceful found=false response makes it safe to probe unconfirmed or unknown hashes without error handling overhead.

## Known failure modes

- Unknown or unindexed transaction hash returns found=false instead of an error
- Invalid hash format (not 0x + 64 hex chars) likely causes a validation error
- Chain enum mismatch — specifying the wrong chain for a hash returns found=false
- Rate limiting or payment failure (x402) returns 402 or relevant HTTP error
- Network or RPC outage on the queried chain may cause a timeout or 5xx error

## How this service works

Transaction lookup and decode on any major EVM chain. Turns a raw tx hash into agent-readable facts: success or failure status, block number, sender and recipient, native value transferred, gas used, fee in native token and USD, and every ERC-20 transfer decoded with token symbol, decimals and human-readable amount. Returns found=false for an unknown hash instead of erroring.

## Output

Returns a JSON object with found (boolean), chain, hash, block number, status (success/failed), from address, to address, value_native, gas_used, fee object (native token amount + USD equivalent), logs_count, and an erc20_transfers array of up to 10 decoded token transfers each including symbol, decimals, and human-readable amount. Returns found=false without error when the hash is unknown.

## 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",
       "pattern": "^0x[a-fA-F0-9]{64}$",
       "description": "Transaction hash to look up."
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string",
       "default": "base",
       "description": "EVM chain to query."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "to": {
       "type": [
        "string",
        "null"
       ]
      },
      "fee": {
       "type": "object",
       "description": "Transaction fee in native token and USD."
      },
      "from": {
       "type": "string"
      },
      "hash": {
       "type": "string"
      },
      "block": {
       "type": "integer"
      },
      "chain": {
       "type": "string"
      },
      "found": {
       "type": "boolean"
      },
      "status": {
       "enum": [
        "success",
        "failed"
       ],
       "type": "string"
      },
      "gas_used": {
       "type": "integer"
      },
      "logs_count": {
       "type": "integer"
      },
      "value_native": {
       "type": "number"
      },
      "erc20_transfers": {
       "type": "array",
       "items": {
        "type": "object"
       },
       "description": "Decoded ERC-20 transfers (symbol/value for the first 10)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-query-api-transaction-lookup-decode-f4386c59/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.cyberwarex.com](https://www.zero.xyz/host/chain.cyberwarex.com/llms.txt)
