# Multi-Chain Gas Compare

> Multi-Chain Gas Compare is a paid API for AI agents from 402.com.tr, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Fetches live gas prices across five major EVM chains and returns ranked USD costs for a token transfer and DEX swap, identifying the cheapest chain to settle on.

## Facts

- Endpoint: GET https://402.com.tr/api/x402/multi-chain-gas?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/multi-chain-gas-compare-d5e0f008
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aKmPatmFf9aiUC_0RAlcQ

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 multi-chain-gas-compare-d5e0f008
```

Example prompt: Before I execute this swap, check the live gas prices across Base, Arbitrum, Optimism, Ethereum, and Polygon and tell me which chain would cost the least in USD for a DEX swap right now.

## When to prefer this

Use this endpoint when an agent needs to decide on which EVM chain to execute a transaction and wants a single ranked answer without making five separate RPC calls. Ideal for gas-aware routing logic in DeFi agents, bridging decisions, or cost optimization across L2s. Prefer this over manually querying each chain's gas API when you need USD-denominated costs (not just gwei) and a direct cheapest-chain recommendation.

## Known failure modes

- One or more chains unreachable — those chains returned as 'unknown' and excluded from ranking rather than guessed
- Stale native token price if price feed is delayed — USD costs may be slightly off
- All chains unavailable — empty or error response returned
- Network timeout on RPC reads causing partial results

## How this service works

Reads the live gas price on each major EVM chain an agent uses (base, arbitrum, optimism, ethereum, polygon) and turns it into the USD cost of the actions that matter — a plain transfer and a DEX swap — using live native-token prices. Returns one ranked answer with the cheapest chain, so an agent deciding where to settle doesn't make five RPC calls. A chain it could not read is 'unknown' and excluded from the pick, never guessed. Gas units are typical estimates. Not financial advice.

## Output

Returns a ranked list of EVM chains (Base, Arbitrum, Optimism, Ethereum, Polygon) ordered from cheapest to most expensive, with the USD cost of a standard ETH transfer and a typical DEX swap on each chain based on live gas prices and live native token prices. Identifies the single cheapest chain for quick decision-making. Chains that could not be read are marked 'unknown' and excluded from the ranking.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/multi-chain-gas-compare-d5e0f008/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402.com.tr](https://www.zero.xyz/host/402.com.tr/llms.txt)
