# Base Gas Price History

> Base Gas Price History is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Returns per-block base fee, gas usage ratio, and priority fee percentiles for the last N blocks on Base, plus summary stats for the window.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/base/gas-history?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-base-gas-price-history-ad084d00
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Sl5POYIknTneb-8c5lBYl

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-data-tools-revmesh2074-workers-dev-base-gas-price-history-ad084d00
```

Example prompt: Can you pull the Base gas fee history for the last 50 blocks and tell me whether fees are trending up or down, and what priority fee I should use right now?

## When to prefer this

Use this endpoint when you need trend analysis, percentile priority fees, or block-level detail for Base gas prices. For a single current gas price snapshot, prefer the base_gas endpoint. Choose this over generic ETH gas APIs when you specifically need Base L2 fee history with per-block granularity and p10/p50/p90 breakdowns.

## Known failure modes

- blocks parameter outside 5-100 range returns a validation error
- RPC timeout or Base node unavailability returns a 5xx error
- Payment failure (insufficient credits) returns 402 before execution
- Non-integer blocks value causes a 400 bad request

## How this service works

Gas price history on Base (eth_feeHistory): base fee in gwei for each of the last N blocks (5-100, default 20), how full each block was, and the 10th, 50th and 90th percentile priority fees, with the low, average and high base fee over the window. Use to judge whether fees are rising, pick a priority fee or time a transaction; for the current price alone use base_gas.

## Output

Returns a JSON object with per-block records (block number, base fee in gwei, gas used ratio, and p10/p50/p90 priority fees), plus window-level summary stats: low, average, high, latest, and next base fee in gwei, and overall p10/p50/p90 priority fee percentiles across the window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "blocks": {
   "type": "integer",
   "description": "How many recent blocks, 5-100 (default 20)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string"
  },
  "blocks": {
   "type": "number"
  },
  "chainId": {
   "type": "number"
  },
  "history": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "block": {
      "type": "number"
     },
     "baseFeeGwei": {
      "type": "number"
     },
     "gasUsedRatio": {
      "type": "number"
     },
     "priorityFeeGwei": {
      "type": "array",
      "items": {
       "type": "number"
      }
     }
    }
   }
  },
  "toBlock": {
   "type": "number"
  },
  "fromBlock": {
   "type": "number"
  },
  "baseFeeGwei": {
   "type": "object",
   "properties": {
    "low": {
     "type": "number"
    },
    "high": {
     "type": "number"
    },
    "next": {
     "type": "number"
    },
    "latest": {
     "type": "number"
    },
    "average": {
     "type": "number"
    }
   }
  },
  "priorityFeeGwei": {
   "type": "object",
   "properties": {
    "p10": {
     "type": "number"
    },
    "p50": {
     "type": "number"
    },
    "p90": {
     "type": "number"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-base-gas-price-history-ad084d00/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
