# Base Onchain Tools – Gas Price

> Base Onchain Tools – Gas Price is a paid API for AI agents from base-onchain-tools.dolerite.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns the current Base mainnet gas price in gwei and estimated ERC-20 transfer cost in ETH, read live from the network.

## Facts

- Endpoint: GET https://base-onchain-tools.dolerite.workers.dev/v1/base/gas
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-onchain-tools-gas-price-786e1a53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8bPdZpIk0c-IlKSmGlh6K

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 base-onchain-tools-gas-price-786e1a53
```

Example prompt: What's the current gas price on Base mainnet and how much would an ERC-20 token transfer cost right now?

## When to prefer this

Choose this endpoint when you need a live, reliable gas price reading on Base mainnet specifically, without setting up your own RPC connection or negotiating rate limits. It is ideal for AI agents, DeFi bots, or wallets that need to make real-time cost decisions before submitting transactions. The pay-per-call x402 model means no account setup and no cost on failures, making it suitable for low-frequency or bursty usage patterns.

## Known failure modes

- Upstream RPC outage across all five providers returns an error (not billed)
- Malformed or unexpected query parameters return a 4xx error (not billed)
- Transient network latency may cause timeouts on slow connections

## How this service works

Eleven read-only endpoints answering questions about Base mainnet that are tedious to assemble from raw RPC: what an unverified contract is actually able to do, whether a token transfer will revert and for what reason, what an arbitrary token is worth, and whether an address is safe to pay. Priced $0.001-$0.04 per call in USDC over x402. No account, no API key, no signup, no minimum, no rate limit to negotiate — the payTo address in the 402 response is the whole integration. Failed calls are not billed. The payment middleware cancels settlement on any 4xx or 5xx, so a malformed parameter or an upstream outage costs nothing. Answers are read live from Base mainnet at request time, with failover across five independent RPC providers. A batch that comes back incomplete is treated as a failure rather than returned with the missing entries as zeros, because a confident wrong answer costs a caller more than an error does. Scope is deliberately narrow: Base mainnet only, reads only, no keys held, nothing stored between requests.

## Output

A JSON object with two fields: gas_price_gwei (the current Base mainnet gas price expressed in gwei as a string) and estimated_erc20_transfer_cost_eth (the estimated cost of a standard ERC-20 token transfer in ETH as a string). Data is read live from Base mainnet at request time with failover across five independent RPC providers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "gas_price_gwei": "0.006",
  "estimated_erc20_transfer_cost_eth": "0.0000004"
 }
}
```

## More

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