# Ethereum Mainnet Gas Price Oracle

> Ethereum Mainnet Gas Price Oracle is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Returns live Ethereum mainnet gas pricing including next-block base fee, percentile priority tips (slow/std/fast), and a ready-to-sign max_fee recommendation, all in decimal gwei.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/eth/gas
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-mainnet-gas-price-oracle-1081b676
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ys0X-ucb_yddux6auOOx3

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-mainnet-gas-price-oracle-1081b676
```

Example prompt: What's the current Ethereum gas price for a standard-speed transaction — give me the base fee, priority tip, and the max fee I should set when signing?

## When to prefer this

Use this endpoint when you need real-time EIP-1559-compatible Ethereum gas parameters in decimal gwei without doing any hex decoding, especially when you need a ready-to-sign max_fee recommendation. Prefer this over raw RPC calls when simplicity and a cached, pre-computed recommendation are more important than absolute freshness.

## Known failure modes

- PublicNode RPC is unreachable — upstream 502 or timeout
- Invalid speed parameter value returns 400 or defaults to std
- Cache stale if Ethereum network conditions change rapidly within 30s window
- No historical data available — only latest block window (last 5 blocks)

## 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 decimal gwei values for: the next-block base fee, the 25/50/75th-percentile priority tips (labeled slow/std/fast), and a ready-to-sign max_fee recommendation (calculated as 2*base_fee + tip). Values are cached for 30 seconds. No hex parsing needed.

## 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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-mainnet-gas-price-oracle-1081b676/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
