82trust / 100

Gas

by Gas Price in Onchain & crypto

x402 APIPassing, checked 58 min ago

Gas price: live gas fees for Ethereum, Base, Arbitrum, Polygon and Solana in one call. Use before sending a transaction to pick a fee or the cheapest chain. Returns base fee, slow/standard/fast priority fees, max fee, congestion, and the USD cost of a transfer, an ERC-20 transfer and a swap per chain, plus Solana priority fees. Optional chain. 0.002 USDC/call; failed calls are free.

GET https://x402-seller-pmlm.onrender.com/gas

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402-seller-pmlm.onrender.com/gas?chain=all"
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%2Fx402-seller-pmlm.onrender.com%2Fgas
const res = await pay("https://x402-seller-pmlm.onrender.com/gas?chain=all");
console.log(await res.json());

Example input

{
  "chain": "all"
}

Example output

{
  "cached": false,
  "chains": [
    {
      "baseFeeGwei": 0.129579,
      "block": 26131718,
      "chain": "ethereum",
      "costStandard": {
        "erc20Transfer": {
          "native": 0.0000117319,
          "usd": 0.03165
        },
        "nativeTransfer": {
          "native": 0.00000379031,
          "usd": 0.01023
        },
        "swap": {
          "native": 0.0000324884,
          "usd": 0.08764
        }
      },
      "gasUsedRatio": 0.529,
      "maxFeePerGasGwei": {
        "fast": 1.25916,
        "slow": 0.260158,
        "standard": 0.31007
      },
      "nativeSymbol": "ETH",
      "nativeUsd": 2697.7,
      "priorityFeeGwei": {
        "fast": 1,
        "slow": 0.001,
        "standard": 0.050912
      }
    },
    {
      "baseFeeGwei": 0.005,
      "block": 52240417,
      "chain": "base",
      "costStandard": {
        "erc20Transfer": {
          "native": 3.965e-7,
          "usd": 0.00107
        },
        "nativeTransfer": {
          "native": 1.281e-7,
          "usd": 0.00035
        },
        "swap": {
          "native": 0.000001098,
          "usd": 0.00296
        }
      },
      "gasUsedRatio": 0.089,
      "maxFeePerGasGwei": {
        "fast": 0.01292,
        "slow": 0.01,
        "standard": 0.0111
      },
      "nativeSymbol": "ETH",
      "nativeUsd": 2697.8,
      "note": "L2 execution cost only; the rollup adds a small L1 data fee per tx",
      "priorityFeeGwei": {
        "fast": 0.00292,
        "slow": 0,
        "standard": 0.0011
      }
    },
    {
      "baseFeeGwei": 0.020016,
      "block": 512172634,
      "chain": "arbitrum",
      "costStandard": {
        "erc20Transfer": {
          "native": 0.00000130104,
          "usd": 0.00351
        },
        "nativeTransfer": {
          "native": 4.20336e-7,
          "usd": 0.00113
        },
        "swap": {
          "native": 0.00000360288,
          "usd": 0.00972
        }
      },
      "gasUsedRatio": 0.08,
      "maxFeePerGasGwei": {
        "fast": 0.040032,
        "slow": 0.040032,
        "standard": 0.040032
      },
      "nativeSymbol": "ETH",
      "nativeUsd": 2696.88,
      "note": "L2 execution cost only; the rollup adds a small L1 data fee per tx",
      "priorityFeeGwei": {
        "fast": 0,
        "slow": 0,
        "standard": 0
      }
    },
    {
      "baseFeeGwei": 246.188,
      "block": 95043353,
      "chain": "polygon",
      "costStandard": {
        "erc20Transfer": {
          "native": 0.0215401,
          "usd": 0.00235
        },
        "nativeTransfer": {
          "native": 0.00695912,
          "usd": 0.00076
        },
        "swap": {
          "native": 0.0596496,
          "usd": 0.0065
        }
      },
      "gasUsedRatio": 0.178,
      "maxFeePerGasGwei": {
        "fast": 780.65,
        "slow": 522.376,
        "standard": 577.574
      },
      "nativeSymbol": "POL",
      "nativeUsd": 0.10899,
      "priorityFeeGwei": {
        "fast": 288.274,
        "slow": 30,
      

Security scan

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

Recent checks

WhenResultHTTPTimePrice
58 min agoPassed402564 ms$0.002
6 h agoPassed402246 ms$0.002