# Gas Price Oracle – Multi-Chain Blockchain Gas Cost Lookup

> Gas Price Oracle – Multi-Chain Blockchain Gas Cost Lookup is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Returns real-time gas prices and estimated transaction costs (transfer, ERC-20 transfer, swap) across major EVM chains, with a recommendation for the cheapest chain to execute on.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/v1/gas-price-oracle?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gas-price-oracle-multi-chain-blockchain-gas-cost-lookup-b84f18ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bwdwCwAi-Nz0UUcNxNXmE

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-oracle-multi-chain-blockchain-gas-cost-lookup-b84f18ff
```

Example prompt: What's the cheapest EVM chain to execute a swap on right now — check Base, Ethereum, and Arbitrum and tell me the estimated USD cost for a 200,000 gas swap on each?

## When to prefer this

Choose this endpoint when an AI agent or trading bot needs real-time, multi-chain gas cost estimates in USD without managing API keys — ideal for autonomous onchain agents that pay per call via x402/USDC on Base. Prefer this over static gas trackers when you need cross-chain comparison and actionable USD cost estimates for specific operation types (transfer, ERC-20, swap).

## Known failure modes

- Upstream RPC timeout causing stale or missing chain data
- Chain subset parameter typo returns 400 or empty results
- USDC payment not processed (x402 payment required, no API key fallback)
- Gas price spike between call and execution making estimate stale
- Unsupported chain name in 'chains' query param silently dropped or rejected

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

A JSON array of chains with gas price in gwei, USD cost estimates for transfer/ERC-20 transfer/swap, native token USD price, upstream RPC URL, latency in ms, and an L1 rollup fee flag; plus a top-level recommendation string naming the cheapest chain, a multiplier showing how much cheaper it is than Ethereum, and a timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "gas": {
       "type": "integer",
       "maximum": 30000000,
       "minimum": 21000,
       "examples": [
        200000
       ],
       "description": "Optional custom gas units; result sorted by custom_usd"
      },
      "chains": {
       "type": "string",
       "examples": [
        "base,ethereum,arbitrum"
       ],
       "description": "Comma list subset of base,ethereum,arbitrum,optimism,polygon,bsc (default all)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chains": [
   {
    "chain": "base",
    "native": "ETH",
    "chain_id": 8453,
    "swap_usd": 0.0011,
    "upstream": "https://base.drpc.org",
    "latency_ms": 80,
    "native_usd": 3850.1,
    "transfer_usd": 0.000154,
    "gas_price_gwei": 0.0019,
    "erc20_transfer_usd": 0.000476,
    "rollup_l1_fee_extra": true
   }
  ],
  "cheapest": "base",
  "gas_units": {
   "swap": 150000,
   "transfer": 21000,
   "erc20_transfer": 65000
  },
  "sorted_by": "swap_usd",
  "updated_at": "2026-10-30T01:30:00Z",
  "recommendation": "Execute on base (~180x cheaper than Ethereum L1); ...",
  "cheapest_swap_usd": 0.0011,
  "ethereum_vs_cheapest_x": 180
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-price-oracle-multi-chain-blockchain-gas-cost-lookup-b84f18ff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
