# Gas Price on Base

> Gas Price on Base is a paid API for AI agents from x402-echo-service.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the current legacy gas price and EIP-1559 base fee of the latest block on the Base blockchain, in both wei and gwei.

## Facts

- Endpoint: POST https://x402-echo-service.onrender.com/chain/gas
- 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/gas-price-on-base-e5a883e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fepQqpOhmu42kkV1glriq

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 gas-price-on-base-e5a883e5 -d '<json body>'
```

Example prompt: What are the current gas fees on Base right now — give me both the legacy gas price and the EIP-1559 base fee in gwei so I can decide whether to submit my transaction.

## When to prefer this

Use this endpoint when you need a quick, pay-per-call read of current Base gas conditions without setting up your own RPC connection. Ideal for agents that gate transactions on fee thresholds or need to display current gas costs to users. Prefer over full node SDKs when you want a lightweight, metered lookup with no infrastructure overhead.

## Known failure modes

- Base RPC node temporarily unavailable — endpoint may return a 5xx error
- Network congestion or timeout may cause delayed or failed responses
- Returned values reflect the latest block at time of call and may be stale by the time a transaction is broadcast

## How this service works

Current gas conditions on Base. POST {} and receive the legacy gas price and the EIP-1559 base fee of the latest block, in wei and gwei. Useful for agents deciding whether to transact now or wait.

## Output

Returns a JSON object containing the current legacy gas price in wei and gwei, the EIP-1559 base fee in wei and gwei, and the block number of the latest block on Base.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "additionalProperties": false
    },
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ]
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "gasPriceWei",
      "gasPriceGwei"
     ],
     "properties": {
      "baseFeeWei": {
       "type": "string"
      },
      "baseFeeGwei": {
       "type": "string"
      },
      "blockNumber": {
       "type": "integer"
      },
      "gasPriceWei": {
       "type": "string"
      },
      "gasPriceGwei": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-price-on-base-e5a883e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-echo-service.onrender.com](https://www.zero.xyz/host/x402-echo-service.onrender.com/llms.txt)
