Api Endpoint

ApiToll Base Gas Oracle

Base gas oracle / gas price API for AI agents and bots — get the gas price for a transaction on Base in one x402 call. Real-time slow/standard/fast EIP-1559 fee tiers from a live eth_feeHistory call, returned as DROP-IN maxFeePerGas + maxPriorityFeePerGas in wei — plug straight into a viem/ethers transaction, no gwei conversion. Plus base fee, head block, and network fullness. Call it before every Base tx to set a fair fee or wait out congestion.

Open interactive test console

Offering

Provider
gas.apitoll.cloud
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Blockchain And Crypto
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://gas.apitoll.cloud/v1/base/gas
MIME type
application/json
First seen
2026-10-16T01:50:06.715Z
Last seen
Tags
Base, Gas, gas-oracle, gas-price, transaction-fees, EVM, EIP-1559, apitoll

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.001 USDC
Atomic price: 1000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "payTo": "0xcc69d619E6053F88A4845066518f465bD06Fc96c"
  }
]

Observed health

Status
Healthy
Latest latency
287 ms
Average latency
587 ms
HTTP status
402
Last checked
Reachability
100% over 15 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "blocks": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "description": "Recent blocks to sample for percentile reward (1..50, clamped). Wider = smoother tiers, narrower = more reactive."
        }
      },
      "required": [
        "blocks"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "example": {
      "type": "object",
      "properties": {
        "network": {
          "type": "string",
          "enum": [
            "base-mainnet",
            "base-sepolia"
          ],
          "description": "Network identifier (Base mainnet or testnet)"
        },
        "block_number": {
          "type": "integer",
          "description": "Latest sampled block number (the head)."
        },
        "base_fee_gwei": {
          "type": "number",
          "description": "EIP-1559 base fee for the next block (gwei, human-readable)."
        },
        "base_fee_wei": {
          "type": "string",
          "description": "Base fee in wei (exact, BigInt-ready decimal string)."
        },
        "tiers": {
          "type": "object",
          "description": "Three fee tiers (slow p10, standard p50, fast p90). Each carries human gwei (max_fee_gwei/max_priority_gwei) AND DROP-IN wei (maxFeePerGas/maxPriorityFeePerGas, BigInt-ready) to plug straight into a viem/ethers tx.",
          "properties": {
            "slow": {
              "type": "object",
              "required": [
                "max_fee_gwei",
                "max_priority_gwei",
                "maxFeePerGas",
                "maxPriorityFeePerGas"
              ],
              "properties": {
                "max_fee_gwei": {
                  "type": "number",
                  "description": "maxFeePerGas in gwei (human-readable)."
                },
                "max_priority_gwei": {
                  "type": "number",
                  "description": "maxPriorityFeePerGas (tip) in gwei (human-readable)."
                },
                "maxFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."
                },
                "maxPriorityFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."
                }
              }
            },
            "standard": {
              "type": "object",
              "required": [
                "max_fee_gwei",
                "max_priority_gwei",
                "maxFeePerGas",
                "maxPriorityFeePerGas"
              ],
              "properties": {
                "max_fee_gwei": {
                  "type": "number",
                  "description": "maxFeePerGas in gwei (human-readable)."
                },
                "max_priority_gwei": {
                  "type": "number",
                  "description": "maxPriorityFeePerGas (tip) in gwei (human-readable)."
                },
                "maxFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."
                },
                "maxPriorityFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."
                }
              }
            },
            "fast": {
              "type": "object",
              "required": [
                "max_fee_gwei",
                "max_priority_gwei",
                "maxFeePerGas",
                "maxPriorityFeePerGas"
              ],
              "properties": {
                "max_fee_gwei": {
                  "type": "number",
                  "description": "maxFeePerGas in gwei (human-readable)."
                },
                "max_priority_gwei": {
                  "type": "number",
                  "description": "maxPriorityFeePerGas (tip) in gwei (human-readable)."
                },
                "maxFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."
                },
                "maxPriorityFeePerGas": {
                  "type": "string",
                  "description": "DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."
                }
              }
            }
          }
        },
        "stats": {
          "type": "object",
          "description": "Sampling metadata: block count and median fullness.",
          "properties": {
            "blocks_sampled": {
              "type": "integer",
              "description": "Number of recent blocks sampled for percentile calculation."
            },
            "median_fullness_pct": {
              "type": "number",
              "description": "Median (gasUsed / gasLimit) × 100 across sampled blocks. 100 = full, 0 = empty."
            },
            "ts": {
              "type": "string",
              "format": "date-time",
              "description": "ISO 8601 timestamp when snapshot was assembled."
            }
          },
          "required": [
            "blocks_sampled",
            "median_fullness_pct",
            "ts"
          ]
        }
      }
    }
  },
  "required": [
    "type"
  ]
}