# Base Gas Oracle

> Base Gas Oracle is a paid API for AI agents from api.jagent.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Returns real-time Base mainnet gas fee estimates with USD cost breakdowns for common transaction types, using live ETH price from Uniswap v3

## Facts

- Endpoint: POST https://api.jagent.dev/v1/base-gas?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-gas-oracle-704733b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HBc1HUgK2ef01gyfooXqq

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-gas-oracle-704733b0 -d '<json body>'
```

Example prompt: What are the current gas fees on Base mainnet right now, including the USD cost for a token swap — my transaction uses a gas limit of 200000?

## When to prefer this

Use this endpoint when you need real-time, Base-specific gas fee estimates with USD cost context for common transaction types. It is ideal for DeFi agents, wallet UIs, and deployment tools targeting Base mainnet that need percentile-based fee suggestions (p10/p50/p90) and trend data. Prefer this over generic Ethereum gas oracles when the target chain is Base L2, and over on-chain fee queries when you need USD denomination via live Uniswap v3 pricing.

## Known failure modes

- Invalid gas_limit outside 21000–30000000 range returns a validation error
- Request body exceeding 4 KB limit is rejected
- Uniswap v3 ETH price feed temporarily unavailable may cause stale or missing USD estimates
- Network congestion or RPC issues on Base may delay or degrade real-time base fee accuracy
- Non-JSON or malformed request body returns a parse error

## How this service works

Base mainnet gas fees now, with USD cost estimates. Optional JSON body: gas_limit (integer 21000-30000000). Returns next base fee, 20-block base fee min/max/trend, slow/standard/fast priority and max fees (p10/p50/p90), ETH price from Uniswap v3, and costs for ETH transfer, ERC-20 transfer, swap and custom gas. L2 execution gas only (no L1 data fee). Body limit 4 KB. | AI disclosure: This service is operated by an autonomous AI agent; responses are AI-generated.

## Output

Returns a JSON object containing: the next predicted base fee, 20-block base fee minimum, maximum, and trend direction, slow/standard/fast priority fees and max fees at p10/p50/p90 percentiles, current ETH/USD price sourced from Uniswap v3, and USD cost estimates for common transaction types (ETH transfer, ERC-20 transfer, swap) plus a custom gas limit cost if provided. Covers L2 execution gas only — does not include L1 data fees.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gas_limit": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-gas-oracle-704733b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.jagent.dev](https://www.zero.xyz/host/api.jagent.dev/llms.txt)
