# StatePulse API - Blockchain Gas History

> StatePulse API - Blockchain Gas History is a paid API for AI agents from statepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns historical base fee gas price statistics (average, min, max in gwei) for a blockchain network

## Facts

- Endpoint: POST https://statepulse-api.hahavoid0.workers.dev/blockchain/gas-history
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/statepulse-api-blockchain-gas-history-3add7094
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jKpNiD6cWh4F8GO2y1Ygy

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 statepulse-api-blockchain-gas-history-3add7094 -d '<json body>'
```

Example prompt: What were the average, minimum, and maximum gas base fees on Ethereum over the last 24 hours? I want the gwei breakdown with a confidence rating.

## When to prefer this

Use this endpoint when an agent needs historical gas fee statistics (avg/min/max base fee) for a blockchain network and wants a simple, structured summary rather than raw block-by-block data. Good for cost estimation, timing optimization, or trend analysis. Requires no API key; pay-per-call at $0.01 USDC via x402 on Base.

## Known failure modes

- Unsupported blockchain network returns supported:false
- Invalid or out-of-range time/block parameters return an error
- Network connectivity issues to the Cloudflare Worker may cause timeouts
- Payment failure via x402/USDC on Base blocks the request

## How this service works

Scans recent block gas details to estimate the minimum, average, and maximum base fee.

## Output

A JSON object containing the average, maximum, and minimum base fee in gwei for the queried period, a 'supported' boolean indicating whether the network is covered, and a confidence level string (e.g. 'high').

## 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": {
     "type": "object",
     "properties": {
      "blocks": {
       "type": "number",
       "default": 20,
       "description": "Number of preceding blocks to scan"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "avg_base_fee_gwei": 0.15,
   "max_base_fee_gwei": 0.3,
   "min_base_fee_gwei": 0.1
  },
  "supported": true,
  "confidence": "high"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statepulse-api-blockchain-gas-history-3add7094/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from statepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/statepulse-api.hahavoid0.workers.dev/llms.txt)
