EVM gas fees and USD transaction costs (6 chains) API

Live gas fees and estimated USD transaction costs on Base, Ethereum, Arbitrum, OP Mainnet, Polygon and Avalanche: base fee and next-block estimate, priority fee p25/p50/p75 over 10 blocks, gas price, 10-block base-fee trend, suggested max fee, and USD cost of a native transfer, ERC-20 transfer and swap (upper-bound rollup L1 fees included), plus the cheapest chain per action. Sources: JSON-RPC via PublicNode (public RPC fallback); prices from on-chain Uniswap v3 pools.

$0.002 per call  USDC over x402 v2 on Base, Polygon, Arbitrum, Avalanche or Sei. No signup, no API key. Requests that fail or match nothing are not charged.

Endpoint

GET https://api.kit-rx.com/v1/chain/gas

Parameters

NameTypeRequiredDescription
chainsstringnoComma-separated chains by name or chain id: base (8453), ethereum (1), arbitrum (42161), optimism (10), polygon (137), avalanche (43114). Default: all six. e.g. base,ethereum,polygon
speedstring: slow, standard, fastnoPriority-fee level used for suggested fees and costs: slow (p25), standard (p50) or fast (p75). Default standard. e.g. standard

Example request

https://api.kit-rx.com/v1/chain/gas?chains=base%2Cethereum%2Cpolygon&speed=standard

Without payment the server answers 402 Payment Required with the price (2000 atomic USDC) in the PAYMENT-REQUIRED header. Any x402 v2 client pays and retries automatically. A request with no parameters runs this example.

curl -i "https://api.kit-rx.com/v1/chain/gas?chains=base%2Cethereum%2Cpolygon&speed=standard"

Pay from an agent

AgentCash: fetch the URL. OpenDexter MCP: x402_fetch. Kit Rx MCP server: https://api.kit-rx.com/mcp. Code:

import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://api.kit-rx.com/v1/chain/gas?chains=base%2Cethereum%2Cpolygon&speed=standard");
console.log(await res.json());

Example response

{
  "query": {
    "chains": [
      "base",
      "ethereum",
      "polygon"
    ],
    "speed": "standard"
  },
  "result": {
    "speed": "standard",
    "priority_percentile": "p50",
    "gas_units": {
      "native_transfer": 21000,
      "erc20_transfer": 65000,
      "swap": 180000
    },
    "chains": [
      {
        "chain": "base",
        "chain_id": 8453,
        "native_symbol": "ETH",
        "block": {
          "number": 57559128,
          "age_s": 0
        },
        "base_fee_gwei": 0.005,
        "next_base_fee_estimate_gwei": 0.005,
        "priority_fee_gwei": {
          "p25": 0.00067667,
          "p50": 0.001125,
          "p75": 0.0025
        },
        "gas_price_gwei": 0.006,
        "trend_10_blocks": {
          "direction": "flat",
          "change_pct": 0,
          "min_base_fee_gwei": 0.005,
          "max_base_fee_gwei": 0.0050038,
          "avg_block_fullness_pct": 10.5
        },
        "at_speed": {
          "max_priority_fee_gwei": 0.001125,
          "max_fee_gwei": 0.011125,
          "effective_gas_price_gwei": 0.006125
        },
        "native_usd": {
          "price": 1766.62,
          "pair": "WETH/USDC",
          "pool": "0x6c561B446416E1A00E8E93E221854d6eA4171372",
          "fee_pct": 0.3
        },
        "usd_cost": {
          "native_transfer": 0.000232,
          "erc20_transfer": 0.00071,
          "swap": 0.00197
        },
        "native_cost": {
          "native_transfer": 1.316e-7,
          "erc20_transfer": 4.02e-7,
          "swap": 0.000001116
        },
        "l1_data_fee_included": true
      },
      {
        "chain": "ethereum",
        "chain_id": 1,
        "native_symbol": "ETH",
        "block": {
          "number": 26416784,
          "age_s": 10
        },
        "base_fee_gwei": 0.27772,
        "next_base_fee_estimate_gwei": 0.28739,
        "priority_fee_gwei": {
          "p25": 0.0054569,
          "p50": 0.15241,
          "p75": 0.93107
        },
        "gas_price_gwei": 0.27773,
        "trend_10_blocks": {
          "direction": "falling",
          "change_pct": -8.59,
          "min_base_fee_gwei": 0.27045,
          "max_base_fee_gwei": 0.32531,
          "avg_block_fullness_pct": 46.7
        },
        "at_speed": {
          "max_priority_fee_gwei": 0.15241,
          "max_fee_gwei": 0.72719,
          "effective_gas_price_gwei": 0.4398
        },
        "native_usd": {
          "price": 1763.04,
          "pair": "WETH/USDC",
          "pool": "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
          "fee_pct": 0.05
        },
        "usd_cost": {
          "native_transfer": 0.0163,
          "erc20_transfer": 0.0504,
          "swap": 0.14
        },
        "native_cost": {
          "native_transfer": 0.000009236,
          "erc20_transfer": 0.00002859,
          "swap": 0.00007916
        },
        "l1_data_fee_included": false
      }
    ],
    "cheapest_chain": {
      "native_transfer": {
        "chain": "base",
        "usd": 0.000232
      },
      "erc20_transfer": {
        "chain": "base",
        "usd": 0.00071
      },
      "swap": {
        "chain": "base",
        "usd": 0.00197
      }
    },
    "errors": []
  },
  "sources": [
    {
      "name": "Base JSON-RPC via PublicNode",
      "url": "https://base-rpc.publicnode.com"
    },
    {
      "name": "Ethereum JSON-RPC via PublicNode",
      "url": "https://ethereum-rpc.publicnode.com"
    }
  ],
  "notes": [
    "Gwei = 1e-9 of the native coin. Cost = gas units x (next base fee + p50 priority fee), plus an upper-bound L1 data fee on Base, OP Mainnet and Arbitrum. Priority fees are medians of eth_feeHistory percentiles over 10 blocks; Arbitrum charges none."
  ],
  "generated_at": "2026-11-15T00:23:21.259Z"
}

Kit Rx: Pay-per-call data and safety tools for AI agents, paid in USDC over x402. No signup, no API key. Machine-readable: OpenAPI, llms.txt, /.well-known/x402, agent skills.