# Base Network Gas Price & Transaction Cost Estimator

> Base Network Gas Price & Transaction Cost Estimator is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-28).

Returns current and next Base L2 gas fees, priority fee tiers (slow/standard/fast), and estimated USD/ETH costs for common transaction types including ETH transfers, ERC-20 ops, DEX swaps, NFT mints, and contract deploys.

## Facts

- Endpoint: GET https://1gateway.dev/v1/onchain/base/gas?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-network-gas-price-transaction-cost-estimator-5e351e84
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lo2QrOb2XDwf-8XXoxLaC

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-network-gas-price-transaction-cost-estimator-5e351e84
```

Example prompt: What are the current gas fees on Base right now — give me the slow, standard, and fast priority fee tiers, and tell me how much a DEX swap and an ERC-20 transfer would cost in USD.

## When to prefer this

Use this endpoint when an agent needs to price or time a transaction on the Base L2 network specifically, including getting actionable gas tier recommendations and real USD cost estimates for common operation types. Prefer over generic Ethereum mainnet gas APIs when the target chain is Base (chainId 8453). Ideal before executing swaps, mints, transfers, or deployments to avoid overpaying or underpricing gas.

## Known failure modes

- RPC node temporarily unavailable — stale or missing block data
- ETH/USD price feed outage — costs returned without USD values
- Rate limit or payment failure — 402 response if x402 payment not processed
- Network congestion causes unusually high or anomalous fee estimates

## How this service works

Use when an agent must price or time a Base transaction. Input: none. Output: JSON current and next base fee, priority fee tiers (slow/standard/fast from the last 20 blocks), suggested maxFeePerGas, block fullness, and typical cost of an ETH transfer, ERC-20 transfer/approve, DEX swap, NFT mint and contract deploy (L2 fee + L1 data fee) in ETH and USD. Example: /v1/onchain/base/gas

## Output

A JSON object containing: current and next base fee in Gwei, priority fee tiers (slow/standard/fast) with maxFeePerGas and maxPriorityFeePerGas suggestions, recent block stats (number, timestamp, gas used %), average block fullness over last 20 blocks, current ETH/USD price, and itemized cost estimates (in ETH and USD, with L2 and L1 data fee breakdown) for ETH transfer, ERC-20 transfer/approve, DEX swap, NFT mint, and contract deploy.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rpc": {
   "kind": "public",
   "source": "base-rpc.publicnode.com"
  },
  "note": "Costs use the next base fee + the standard (median 50th-percentile) tip over the last 20 blocks, plus the L1 data fee upper bound from the GasPriceOracle. Gas …",
  "block": {
   "number": 52774276,
   "timestamp": "2026-10-18T15:38:19.000Z",
   "gasUsedPct": 11.7
  },
  "chain": "base",
  "costs": [
   {
    "label": "ETH transfer",
    "action": "eth_transfer",
    "l2FeeEth": 1.26e-7,
    "totalEth": 1.267e-7,
    "totalUsd": 0.0003011,
    "typicalGas": 21000,
    "l1DataFeeEth": 7.056e-10
   }
  ],
  "ethUsd": 2376,
  "chainId": 8453,
  "suggested": {
   "fast": {
    "maxFeePerGasGwei": 0.0122,
    "maxPriorityFeePerGasGwei": 0.0022
   },
   "slow": {
    "maxFeePerGasGwei": 0.0105,
    "maxPriorityFeePerGasGwei": 0.0005001
   },
   "standard": {
    "maxFeePerGasGwei": 0.011,
    "maxPriorityFeePerGasGwei": 0.001
   }
  },
  "baseFeeGwei": 0.005,
  "recentBlocks": {
   "count": 20,
   "avgGasUsedPct": 8.5
  },
  "nextBaseFeeGwei": 0.005,
  "priorityFeeGwei": {
   "fast": 0.0022,
   "node": 0.001,
   "slow": 0.0005001,
   "standard": 0.001
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-network-gas-price-transaction-cost-estimator-5e351e84/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
