# Swift Bot Labs EVM Gas Price Lookup

> Swift Bot Labs EVM Gas Price Lookup is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Returns current gas price, base fee, priority fee, and estimated transfer costs for a specified EVM-compatible blockchain network

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/evm/gas?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-evm-gas-price-lookup-c93f6ede
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TOxg-SH7-UxnTdRcljE7h

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 swift-bot-labs-evm-gas-price-lookup-c93f6ede
```

Example prompt: What are the current gas fees on Base — including the base fee, gas price, and estimated cost for an ERC-20 transfer?

## When to prefer this

Use this endpoint when you need real-time, on-chain gas data for EVM-compatible networks without managing API keys or subscriptions — ideal for agents making cost-gating decisions before submitting transactions. Covers 10+ chains including Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Gnosis, and testnets. Pay per call at $0.003 USDC, making it cost-effective for sporadic lookups.

## Known failure modes

- Unsupported chain name or chain ID returns an error
- Network connectivity issues to the target RPC may cause transient failures
- Stale data if the underlying RPC node is behind
- Returns 402 Payment Required if USDC payment via x402 is not provided or invalid

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

A JSON object containing: the current block number, chain name, base fee in Gwei, gas price in Gwei, priority fee in Gwei, and estimated USD costs for both a native transfer and an ERC-20 token transfer on the requested chain.

## 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",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "chain": {
       "type": "string",
       "description": "One of ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, gnosis, base-sepolia, sepolia (or a chain id)"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "evm-gas",
  "result": {
   "block": 37512345,
   "chain": "base",
   "costs": {
    "erc20Transfer": "0.000000403",
    "nativeTransfer": "0.000000130"
   },
   "baseFeeGwei": "0.0052",
   "gasPriceGwei": "0.0062",
   "priorityFeeGwei": "0.001"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-evm-gas-price-lookup-c93f6ede/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
