B

base-gas-x402 · GAS Cheapest Window

by base-gas-x402

GETBase

$0.02

per call · USD Coin on Base

Cheapest hours of day to transact on Base, from collected gas history: hourly averages in UTC ranked cheapest first, plus the savings percent.

Endpoint

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

2

Calls / 30d

2

Unique payers / 30d

Sep 9

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/cheapest-window", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://base-gas-x402-production.up.railway.app/gas/cheapest-window?hours=168" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "chain": "base-mainnet",
  "chainId": 8453,
  "cheapestHourUtc": 6,
  "coverage": {
    "hoursCovered": 168,
    "retentionHours": 168,
    "samples": 2016
  },
  "fetchedAt": "2026-07-26T06:08:54.972Z",
  "hourlyAverages": [
    {
      "avgGasPrice": 0.005,
      "hourUtc": 6,
      "samples": 84
    },
    {
      "avgGasPrice": 0.019,
      "hourUtc": 14,
      "samples": 84
    }
  ],
  "hoursObserved": 24,
  "priciestHourUtc": 14,
  "requestedHours": 168,
  "savingsPercent": 73.7,
  "units": "gwei"
}

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