# Ethereum Gas Price Estimator

> Ethereum Gas Price Estimator is a paid API for AI agents from data.greeneris.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Returns current Ethereum mainnet gas price estimates (base fee, priority fee, max fee) across slow/standard/fast speed tiers

## Facts

- Endpoint: GET https://data.greeneris.io/v1/eth/gas
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-gas-price-estimator-f209211b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7xFgxyhcAbLTTCASqpseT

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 ethereum-gas-price-estimator-f209211b
```

Example prompt: What's the current Ethereum gas price? Give me the standard speed recommendation with base fee and max priority fee in gwei.

## When to prefer this

Use this endpoint when an AI agent needs real-time Ethereum gas price data without setting up its own RPC node or managing API keys. Ideal for agents automating on-chain transactions, estimating transaction costs, or deciding when to submit a transaction based on current network conditions. Pay-per-call x402 model means no subscription needed.

## Known failure modes

- RPC node unavailable — upstream PublicNode failure returns 5xx
- Payment not made — HTTP 402 returned with machine-readable price quote requiring USDC payment on Base via x402 before retry
- Invalid speed parameter value — non-enum value ignored or error returned
- Network congestion causing stale block data

## How this service works

Live Ethereum mainnet gas pricing from PublicNode RPC: next-block base fee, 25/50/75th-percentile priority tips over the last 5 blocks (slow/std/fast), and a ready-to-sign recommendation (max_fee = 2*base + tip). Query: ?speed=slow|std|fast (default std). All values are decimal gwei, no hex parsing needed. 30s cache.

## Output

Returns a JSON object with: recommended gas settings for the requested speed tier (max_fee_gwei, max_priority_fee_gwei, speed), current base_fee_gwei derived from recent blocks, legacy_gas_price_gwei, priority_fee_gwei broken down by slow/std/fast percentiles (25th/50th/75th), number of blocks sampled (default 5), and source description indicating PublicNode RPC.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "speed": {
       "enum": [
        "slow",
        "std",
        "fast"
       ],
       "type": "string",
       "default": "std",
       "description": "Which priority-fee percentile to recommend (25/50/75)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "Ethereum mainnet via PublicNode RPC (eth_gasPrice + eth_feeHistory, last 5 blocks)",
  "recommended": {
   "speed": "std",
   "max_fee_gwei": 0.135,
   "max_priority_fee_gwei": 0.0054
  },
  "base_fee_gwei": 0.0648,
  "blocks_sampled": 5,
  "priority_fee_gwei": {
   "std": 0.0054,
   "fast": 0.1337,
   "slow": 0.005
  },
  "legacy_gas_price_gwei": 0.0609
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-gas-price-estimator-f209211b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.greeneris.io](https://www.zero.xyz/host/data.greeneris.io/llms.txt)
