# Agent Exchange — Latest Block Data

> Agent Exchange — Latest Block Data is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.09/call, status unknown (last checked 2026-10-12).

Returns live block metadata for a given EVM chain, including block number, timestamp, gas utilization, base fee, transaction count, and congestion status.

## Facts

- Endpoint: GET https://store.agentexchange.work/chain/block?utm_source=zero.xyz
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-exchange-latest-block-data-296be055
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r38x5AqfWpOnj6EFqtslx

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 agent-exchange-latest-block-data-296be055
```

Example prompt: What does the latest block on Base look like right now — is the network congested, and what's the base fee in gwei?

## When to prefer this

Choose this endpoint when you need a single, parsed, human-readable block summary — including congestion, gas fee, and utilization — without writing raw eth_getBlockByNumber RPC calls or parsing raw hex responses. It is ideal for agents that need to make gas-aware decisions, monitor chain health, or display chain state to users, especially across multiple EVM networks from a single API. Prefer this over raw RPC endpoints when you want normalized gwei values and a congestion flag pre-computed.

## Known failure modes

- Invalid chain name returns an error — must be one of base, ethereum, optimism, arbitrum, polygon, gnosis
- Block number out of range or not yet finalized returns an error
- Payment failure (insufficient USDC or missing x402 header) returns HTTP 402
- Rate limiting or upstream RPC unavailability may return 5xx errors
- Passing a non-numeric, non-hex, non-tag string as block number will fail validation

## How this service works

Live data APIs for AI agents and analysts. Buy an all-access API key for $29/month with a credit card, or pay per call in USDC. No sales call.

## Output

Returns a JSON object with: chain name, block number, unix timestamp, age in seconds since block was produced, transaction count, gas used, gas limit, utilization ratio (0–1), base fee in gwei, and a boolean congestion flag.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "number": {
       "type": "string",
       "description": "Block height (decimal or 0x hex) or latest|finalized|safe|earliest (default latest)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "tx_count": {
       "type": "number"
      },
      "congested": {
       "type": "boolean"
      },
      "timestamp": {
       "type": "number"
      },
      "utilization": {
       "type": "number"
      },
      "base_fee_gwei": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "gas_used": 5300000,
  "tx_count": 191,
  "congested": false,
  "gas_limit": 150000000,
  "timestamp": 1785718000,
  "age_seconds": 4,
  "utilization": 0.0353,
  "block_number": 49464704,
  "base_fee_gwei": 0.005
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exchange-latest-block-data-296be055/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
