80trust / 100

Base Gas

by AllTheBot Base gas price in Other

x402 APIPassing, checked 5 h ago

Gas price on Base right now: gas price, base fee and priority fee in gwei, plus the cost of a simple ETH transfer. Decide whether to transact now or wait. No input needed.

GET https://api.zkrobotics.fr/x402/base/gas

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
59 ms typical, 59 ms slowest 5%
Last check
5 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.zkrobotics.fr/x402/base/gas"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.zkrobotics.fr%2Fx402%2Fbase%2Fgas
const res = await pay("https://api.zkrobotics.fr/x402/base/gas");
console.log(await res.json());

Example output

{
  "base_fee_gwei": "0.005220514",
  "block": 52335817,
  "eth_transfer_cost_eth": "0.000000130630794",
  "gas_price_gwei": "0.006220514",
  "network": "base",
  "note": "excludes the L1 data fee, usually very small on Base",
  "priority_fee_gwei": "0.001"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
5 h agoPassed40259 ms$0.002