Gas optimizer

Find the cheapest gas right now: Base gas, Ethereum gas, Base fee estimate, and ETH price for USD conversion.

$0.007 per call · one payment for the whole workflow
POST /api/skill/gas-optimizer
Sample output + API docs →

3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.

When to use this pack

Timing a transaction - compare gas across chains and decide whether to act now or wait.

Tools in this pack

All 3 run inside the single $0.007 call above. Each is also callable on its own if you only need one part.

Bought one at a time, these 3 tools cost $0.007 together; the pack is that sum less a 10% bundle discount, rounded up to the $0.001 settlement floor, which is $0.007.

Workflow

  1. Get Base gas tiers (slow/standard/fast).
  2. Get Ethereum gas tiers for comparison.
  3. Get a Base fee estimate for a standard transfer.
  4. Get ETH price to express costs in USD.

What one call returns

A JSON object with pack, args, steps, summary; steps holds one entry per tool (gas-snapshot, gas-estimate, crypto-price), each with its own result or error. Full example on the API page.

Call it directly

Any x402 client pays the 402 and gets the whole workflow back in one response. With the agent402-client SDK (npm i agent402-client, an ES module):

import { Agent402 } from "agent402-client";
// payFetch: an x402-wrapped fetch your wallet signs (@x402/fetch).
// Tools on the free tier need no options: new Agent402() pays them by proof-of-work.
// an existing prepaid credits key also works: new Agent402({ creditsKey })
const client = new Agent402({ fetch: payFetch });
const result = await client.call("skill-gas-optimizer", {});

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Find the cheapest gas right now using Agent402's gas-optimizer skill pack. Get (1) Base gas tiers, (2) Ethereum gas tiers, (3) Base fee estimate, (4) ETH price. Tell me the cost in USD and whether to act now or wait.

← All skill packs