# OP Mainnet Gas Conditions

> OP Mainnet Gas Conditions is a paid API for AI agents from ca-tax-api-mainnet.lxtap.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-23).

Returns current Optimism Mainnet gas metrics including block number, base fee, gas price, priority fee in gwei, and estimated ETH/USD cost of native and ERC-20 transfers.

## Facts

- Endpoint: GET https://ca-tax-api-mainnet.lxtap.workers.dev/optimism/gas?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/op-mainnet-gas-conditions-01f7c7c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_URkKdH2AO2lFG5mfCgRKs

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 op-mainnet-gas-conditions-01f7c7c9
```

Example prompt: What are the current gas fees on Optimism Mainnet right now — give me the base fee, priority fee, gas price in gwei, and how much a native ETH transfer and an ERC-20 transfer would cost in both ETH and USD.

## When to prefer this

Choose this endpoint when you specifically need real-time gas metrics for the Optimism (OP) Mainnet L2 network, including both raw gwei values and human-friendly USD cost estimates for common transaction types. Prefer over Ethereum Mainnet gas endpoints when your user is transacting on Optimism, and over generic gas trackers when you need structured JSON with USD cost estimates powered by Chainlink.

## Known failure modes

- RPC node unavailability causes stale or missing block data
- Chainlink ETH/USD feed latency may cause slightly outdated USD estimates
- Network congestion on OP Mainnet could cause transient read errors
- Cloudflare Worker cold-start latency on first invocation
- x402 payment failure if USDC balance is insufficient

## How this service works

Pay-per-call data for AI agents, paid in USDC on Base with x402: token risk checks (rug check) on Base, Ethereum, Arbitrum, Optimism, Polygon and Solana, onchain reads (balances, transactions, gas, contracts, NFTs, whale trades, new pools, ENS and Basenames), ECB exchange rates, and Canadian sales tax and business days.

## Output

Returns a JSON object with the current OP Mainnet block number, base fee in gwei, gas price in gwei, priority fee (tip) in gwei, and estimated costs in both ETH and USD for a native ETH transfer and an ERC-20 token transfer (using Chainlink ETH/USD price feed for USD conversion).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "required": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Excludes OP Mainnet's L1 data fee, which adds a small amount per transaction.",
  "chain": "optimism",
  "blockTime": "2026-10-22T15:50:33.000Z",
  "nativeUsd": 2394.09,
  "baseFeeGwei": "0.000000304",
  "blockNumber": 158542728,
  "gasPriceGwei": "0.001000304",
  "nativeSymbol": "ETH",
  "estimatedCost": {
   "erc20Transfer": {
    "usd": 0.0001557,
    "native": "0.00000006501976"
   },
   "nativeTransfer": {
    "usd": 0.00005029,
    "native": "0.000000021006384"
   }
  },
  "maxPriorityFeeGwei": "0.001"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/op-mainnet-gas-conditions-01f7c7c9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ca-tax-api-mainnet.lxtap.workers.dev](https://www.zero.xyz/host/ca-tax-api-mainnet.lxtap.workers.dev/llms.txt)
