Skip to content
Fourohtwo

api.x-402.online/v1/chain/gas

Get the current Base gas price and the ETH cost of an ETH, ERC-20 or x402 USDC transfer at that price. Current Base gas: gas price, base fee, priority fee, and the ETH cost of an ETH transfer, an ERC-20 transfer and an x402 USDC settlement at that price. Query: none.

BaseSolanaAnswering
GEThttps://api.x-402.online/v1/chain/gas

Uptime100% of 5 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.x-402.online/v1/chain/gas");
console.log(await res.json());

Example input

{}