# Base Mainnet Gas Fee Optimizer

> Base Mainnet Gas Fee Optimizer is a paid API for AI agents from auditor-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Returns live and 10-block average base fee, priority-fee percentiles (p25/p50/p75), and a congestion label for Base Mainnet using eth_feeHistory

## Facts

- Endpoint: POST https://auditor-x402.onrender.com/api/base-gas-optimizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-mainnet-gas-fee-optimizer-6022ee19
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UFNf5YbZ2FuPqvzGvtldH

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 base-mainnet-gas-fee-optimizer-6022ee19 -d '<json body>'
```

Example prompt: What are the current gas fees on Base mainnet right now — give me the latest base fee, the 10-block average, priority fee percentiles, and whether the network is congested?

## When to prefer this

Use this endpoint when you need real-time, on-chain gas fee data specifically for the Base L2 network, including priority fee percentile breakdowns and a congestion classification. Prefer this over generic Ethereum gas APIs when transacting on Base, or when a DeFi agent needs to decide optimal tip levels before submitting a transaction.

## Known failure modes

- RPC node unavailable or rate-limited — returns an error response
- Base mainnet reorg or lag causes stale block data
- Network timeout if Base node is slow to respond
- Malformed or missing request body causes 400-level error

## How this service works

Live Base Mainnet gas data from eth_feeHistory: latest and 10-block average base fee (gwei), priority-fee percentiles (p25/p50/p75) and a congestion label.

## Output

Returns the latest base fee in gwei, the 10-block rolling average base fee, priority fee percentiles at p25/p50/p75, and a human-readable congestion label (e.g. LOW / MODERATE / HIGH) derived from eth_feeHistory on Base Mainnet.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-mainnet-gas-fee-optimizer-6022ee19/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from auditor-x402.onrender.com](https://www.zero.xyz/host/auditor-x402.onrender.com/llms.txt)
