B

base-gas-x402 · GAS Compare

by base-gas-x402

GETBase

$0.01

per call · USD Coin on Base

Live gas cost comparison across Base, OP Mainnet, Arbitrum One, and Ethereum in one call, ranked cheapest first.

Endpoint

GET https://base-gas-x402-production.up.railway.app/gas/compare

6

Calls / 30d

3

Unique payers / 30d

Aug 27

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://base-gas-x402-production.up.railway.app/gas/compare", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://base-gas-x402-production.up.railway.app/gas/compare?gasLimit=21000" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "baseRank": 1,
  "baseVsEthereum": "Base is 240.5x cheaper than Ethereum",
  "basis": "current gas price x gasLimit",
  "chains": [
    {
      "baseFeePerGas": "0.005",
      "blockNumber": "49106604",
      "chain": "base",
      "chainId": 8453,
      "estimatedCost": {
        "eth": "0.000000126",
        "gasLimit": 21000,
        "gwei": "126"
      },
      "gasPrice": "0.006",
      "label": "Base"
    }
  ],
  "cheapest": "base",
  "fetchedAt": "2026-07-25T18:02:36.639Z",
  "gasLimit": 21000,
  "unavailable": []
}

Payment details

Pay to0x0d083590c048a243e24a75e3a7c968145de25b44
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from base-gas-x402 & similar services