82trust / 100

Gas Snapshot

by Gas snapshot (slow / standard / in Onchain & crypto

x402 APIPassing, checked 10 min ago

Live gas price snapshot for a chain - slow / standard / fast tiers in gwei, plus the latest base fee. Sampled from eth_feeHistory (last 4 blocks, 25th/50th/90th percentile priority fees). Use to estimate before broadcasting a transaction from another tool.

POST https://agent402.tools/api/gas-snapshot

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
185 ms typical, 185 ms slowest 5%
Last check
10 min ago
Next check
in 21 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/gas-snapshot" \
  -H "content-type: application/json" \
  -d '{"network":"base"}'
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%2Fagent402.tools%2Fapi%2Fgas-snapshot
const res = await pay("https://agent402.tools/api/gas-snapshot", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"network":"base"}),
});
console.log(await res.json());

Example input

{
  "network": "base"
}

Example output

{
  "baseFeeGwei": 0.005,
  "chainId": 8453,
  "fast": {
    "priorityFeeGwei": 0.005,
    "totalGwei": 0.01
  },
  "network": "base",
  "slow": {
    "priorityFeeGwei": 0.001,
    "totalGwei": 0.006
  },
  "standard": {
    "priorityFeeGwei": 0.002,
    "totalGwei": 0.007
  }
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
10 min agoPassed402427 ms$0.005
3 h agoPassed402182 ms$0.005
9 h agoPassed402185 ms$0.005