# MGO Multi-chain Gas Optimizer - Basic

> MGO Multi-chain Gas Optimizer - Basic is a paid API for AI agents from api.mgo.chain-ops.xyz, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Fetches real-time gas prices across up to 9 EVM chains and returns estimated transaction costs plus a cheapest-chain recommendation

## Facts

- Endpoint: GET https://api.mgo.chain-ops.xyz/gas/basic
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mgo-multi-chain-gas-optimizer-basic-5a95833b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wmZ8_MIcFk4dbcuq_d_pL

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 mgo-multi-chain-gas-optimizer-basic-5a95833b
```

Example prompt: Check real-time gas prices across all supported EVM chains and tell me which one is cheapest right now for doing a DEX swap — I want the estimated cost in USDC and Gwei for each chain.

## When to prefer this

Use this endpoint when you need a real-time cross-chain gas comparison across multiple EVM networks in a single call rather than querying each chain's RPC individually. Ideal for DeFi routing agents, wallet UIs, or cost-optimization workflows that need to decide which chain to execute a transaction on. Prefer this over chain-specific gas oracles when the goal is to minimize fees by choosing the optimal network.

## Known failure modes

- RPC node unavailability for one or more chains returns that chain with status != ok
- Payment not received via x402 results in 402 Payment Required response
- Network timeout if multiple chain RPCs are slow simultaneously
- Stale gas data if upstream RPC is lagging
- Invalid or missing x402 payment header returns authentication error

## How this service works

Compare real-time gas prices across up to 9 EVM chains and get a cheapest-chain recommendation. Pay-per-call via x402 (USDC on Base). No API key.

## Output

Returns a JSON object with a tier field, a list of supported chains each containing: chain name, chainId, status, gas price breakdown (baseFeeGwei, totalFeeGwei, priorityFeeGwei), native token symbol and USD price, and estimated costs in both USDC and native token for three transaction types (native transfer, ERC-20 transfer, DEX swap). Also includes a cheapest-chain recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tier": "basic",
  "chains": [
   {
    "chain": "Ethereum",
    "status": "ok",
    "chainId": 1,
    "gasPrice": {
     "baseFeeGwei": "12.3456",
     "totalFeeGwei": "12.3456",
     "priorityFeeGwei": "0.0010"
    },
    "nativeToken": "ETH",
    "tokenPriceUsd": 3500,
    "estimatedCosts": {
     "dexSwap": {
      "usdc": 5.12,
      "label": "DEX swap (Uniswap-style)",
      "native": "0.00030000",
      "gasUnits": "150000"
     },
     "erc20Transfer": {
      "usdc": 0.455,
      "label": "ERC-20 token transfer",
      "native": "0.00013000",
      "gasUnits": "65000"
     },
     "nativeTransfer": {
      "usdc": 0.147,
      "label": "Simple native token transfer",
      "native": "0.00004200",
      "gasUnits": "21000"
     }
    }
   },
   {
    "chain": "Base",
    "status": "ok",
    "chainId": 1,
    "gasPrice": {
     "baseFeeGwei": "0.0100",
     "totalFeeGwei": "0.0100",
     "priorityFeeGwei": "0.0010"
    },
    "nativeToken": "ETH",
    "tokenPriceUsd": 3500,
    "estimatedCosts": {
     "dexSwap": {
      "usdc": 0.001,
      "label": "DEX swap (Uniswap-style)",
      "native": "0.00030000",
      "gasUnits": "150000"
     },
     "erc20Transfer": {
      "usdc": 0.455,
      "label": "ERC-20 token transfer",
      "native": "0.00013000",
      "gasUnits": "65000"
     },
     "nativeTransfer": {
      "usdc": 0.147,
      "label": "Simple native token transfer",
      "native": "0.00004200",
      "gasUnits": "21000"
     }
    }
   },
   {
    "chain": "Arbitrum",
    "status": "ok",
    "chainId": 1,
    "gasPrice": {
     "baseFeeGwei": "0.0200",
     "totalFeeGwei": "0.0200",
     "priorityFeeGwei": "0.0010"
    },
    "nativeToken": "ETH",
    "tokenPriceUsd": 3500,
    "estimatedCosts": {
     "dexSwap": {
      "usdc": 0.002,
      "label": "DEX swap (Uniswap-style)",
      "native": "0.00030000",
      "gasUnits": "150000"
     },
     "erc20Transfer": {
      "usdc": 0.455,
      "label": "ERC-20 token transfer",
      "native": "0.00013000",
      "gasUnits": "65000"
     },
     "nativeTransfer": {
      "usdc": 0.147,
      "label": "Simple native token transfer",
      "native": "0.00004200",
      "gasUnits": "21000"
     }
    }
   },
   {
    "chain": "Optimism",
    "status": "ok",
    "chainId": 1,
    "gasPrice": {
     "baseFeeGwei": "0.0150",
     "totalFeeGwei": "0.0150",
     "priorityFeeGwei": "0.0010"
    },
    "nativeToken": "ETH",
    "tokenPriceUsd": 3500,
    "estimate
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mgo-multi-chain-gas-optimizer-basic-5a95833b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.mgo.chain-ops.xyz](https://www.zero.xyz/host/api.mgo.chain-ops.xyz/llms.txt)
