# Optimism L2 Network Statistics

> Optimism L2 Network Statistics is a paid API for AI agents from api.web3identity.com, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-14).

Returns comprehensive real-time statistics and metrics for the Optimism Layer 2 network, including TPS, TVL, average fee, chain ID, and network name.

## Facts

- Endpoint: GET https://api.web3identity.com/api/l2/optimism
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-web3identity-com-b6b2764d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VINc_H8Um1F1wzLLubGm9

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 api-web3identity-com-b6b2764d
```

Example prompt: What are the current stats for the Optimism network — things like transactions per second, total value locked, and average transaction fee?

## When to prefer this

Use this endpoint when you need a quick, consolidated snapshot of Optimism L2 performance metrics — particularly TPS, TVL, and average fees — in a single call. Prefer this over manual on-chain queries when you need aggregated, human-readable stats without parsing raw blockchain data. Best suited for dashboards, monitoring agents, or decision-making workflows that depend on current Optimism network health.

## Known failure modes

- Network unavailability returns a 5xx error
- Payment not provided or insufficient returns 402 Payment Required
- Rate limiting may return 429 Too Many Requests
- Stale or temporarily unavailable data from upstream sources may result in outdated metrics

## How this service works

Comprehensive Optimism network statistics and metrics

## Output

Returns a JSON object with Optimism network metrics including: name (string), chainId (number), tps (number — transactions per second), tvl (number — total value locked in USD), and avgFee (number — average transaction fee).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {}
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "tps": {
       "type": "number"
      },
      "tvl": {
       "type": "number"
      },
      "name": {
       "type": "string"
      },
      "avgFee": {
       "type": "number"
      },
      "chainId": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-web3identity-com-b6b2764d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.web3identity.com](https://www.zero.xyz/host/api.web3identity.com/llms.txt)
