# x402.onchainexpat.com Gas Oracle

> x402.onchainexpat.com Gas Oracle is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns real-time gas price estimates and fee recommendations (low/medium/high/instant tiers) for Base and Solana chains, including USD cost estimates and transaction timing guidance.

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-crypto/gas-oracle
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-onchainexpat-com-8cd655bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QuJCb0xyuoVvbQClx1tJp

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 x402-onchainexpat-com-8cd655bf -d '<json body>'
```

Example prompt: What are the current gas prices on Base — give me the low, medium, high, and instant fee tiers in gwei and USD, and tell me whether I should transact now or wait?

## When to prefer this

Use this endpoint when an AI agent needs real-time, chain-specific gas fee data with USD cost estimates and a human-readable transaction recommendation — especially for Base or Solana. Prefer over generic RPC calls when you need tiered fee suggestions (low/medium/high/instant) with confirmation time estimates and network congestion level already computed.

## Known failure modes

- Unsupported chain identifier returns an error or empty data
- RPC node unavailability may cause stale or failed gas reads
- Missing or malformed 'chain' field in request body results in 400 error
- Cached:false indicates live fetch which may have higher latency under load

## How this service works

Real-time gas price estimates and fee recommendations across supported chains (e.g., Base and Solana) for accurate transaction cost calculations.

## Output

Returns a structured object with EIP-1559 base fee and priority fee tiers (low/medium/high/instant) in wei and gwei, estimated confirmation times in seconds, transfer costs in ETH and USD, current ETH price in USD, network status (e.g. 'low'/'medium'/'high'), a recommendation on whether to transact now, and the chain's block time.

## Example request

```json
{
 "chain": "base"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string",
   "description": "Blockchain (default: ethereum)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "chain": {
     "type": "string"
    },
    "eip1559": {
     "type": "object",
     "description": "Base fee and priority fees in gwei"
    },
    "gas_prices": {
     "type": "object",
     "description": "Gas prices for low/medium/high/instant with gwei, wei, and USD cost"
    },
    "network_status": {
     "type": "object",
     "description": "Congestion level and description"
    },
    "recommendation": {
     "type": "object",
     "description": "Action, reason, and urgency"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-onchainexpat-com-8cd655bf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
