81trust / 100

Onchain Gas

by dt0ur.online in Onchain & crypto

x402 APIPassing, checked 3 h ago

Live gas prices across base, ethereum, arbitrum, optimism, polygon, bsc, sorted cheapest first: base fee and gas price in gwei, plus the USD cost of a native transfer and of an ERC-20 transfer on each chain, so an agent can pick where to transact.

POST https://dt0ur.online/api/onchain/gas

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://dt0ur.online/api/onchain/gas" \
  -H "content-type: application/json" \
  -d '{"chains":["base","ethereum","arbitrum"]}'
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%2Fdt0ur.online%2Fapi%2Fonchain%2Fgas
const res = await pay("https://dt0ur.online/api/onchain/gas", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"chains":["base","ethereum","arbitrum"]}),
});
console.log(await res.json());

Example input

{
  "chains": [
    "base",
    "ethereum",
    "arbitrum"
  ]
}

Example output

{
  "chains": [
    {
      "base_fee_gwei": 0.005,
      "block_number": 51655589,
      "chain": "base",
      "chain_id": 8453,
      "erc20_transfer_usd": 0.001073,
      "gas_price_gwei": 0.006,
      "native_price_usd": 2752.08,
      "native_symbol": "ETH",
      "native_transfer_usd": 0.0003468
    },
    {
      "base_fee_gwei": 0.02024,
      "block_number": 507864148,
      "chain": "arbitrum",
      "chain_id": 42161,
      "erc20_transfer_usd": 0.003616,
      "gas_price_gwei": 0.02024,
      "native_price_usd": 2748.73,
      "native_symbol": "ETH",
      "native_transfer_usd": 0.001168
    },
    {
      "base_fee_gwei": 0.154926806,
      "block_number": 26034738,
      "chain": "ethereum",
      "chain_id": 1,
      "erc20_transfer_usd": 0.02768,
      "gas_price_gwei": 0.154926806,
      "native_price_usd": 2748.73,
      "native_symbol": "ETH",
      "native_transfer_usd": 0.008943
    }
  ],
  "cheapest_chain": "base",
  "note": "Execution fee only; rollups (base, arbitrum, optimism) add a calldata-dependent L1 data fee.",
  "timestamp": "2026-09-22T18:08:45.816Z"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402328 ms$0.01
8 h agoPassed402194 ms$0.01