$ man gas-price
/gas-price
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
gas-price — estimates current gas prices and eip-1559 fees on base, ethereum, optimism, and arbitrum
synonym alias of gas-now-base — reuses the canonical handler.
SYNOPSIS
POST https://x402.agentutility.ai/gas-price
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Estimates current gas prices and EIP-1559 fees on Base, Ethereum, Optimism, and Arbitrum. Reads the chain's latest block, derives base fee, suggests priority fees for safe-low/standard/fast tiers, computes total maxFeePerGas, and converts cost to USD for common tx types. Use it as a gas price API, EIP-1559 fee estimator, multi-chain gas tracker, or pre-tx cost estimator.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| chain | string | EVM L1/L2 to read gas from. Default 'base'. enum: base · ethereum · optimism · arbitrum · polygon | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| chain | string | Chain name queried (e.g. base, ethereum, optimism, arbitrum). |
| base_fee_gwei | string | Latest block's base fee per gas in gwei, derived from EIP-1559. |
| priority_fee_gwei | string | Suggested miner tip in gwei for the requested speed tier. |
| total_recommended_gwei | string | Recommended maxFeePerGas in gwei (base fee plus priority fee). |
| block_number | string | Block height the base fee was read from. |
| eth_price_usd | string | ETH spot price in USD used to convert gas cost. |
| cost_usd | string | Estimated total tx cost in USD for a common transaction type. |
| timestamp | string | ISO-8601 UTC time the gas reading was taken. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/gas-price \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the gas-price tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- edge-marketgas-priceeip-1559fee-estimatorbase-feepriority-feegas-tracker
- methods
- POST
- cluster
- edgemarket
- price
- $0.02 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| defi-llama | DefiLlama API / DeFi TVL protocol lookup. | $0.02 |
| defi-llama-api | Looks up DeFi protocol fundamentals from DefiLlama, resolving protocol TVL, category, chains, token symbol, and protocol metadata. | $0.02 |
| defi-llama-protocol | Looks up any DeFi protocol's TVL and metadata from DefiLlama. | $0.02 |
| defi-tvl | DeFi TVL API / total value locked by protocol. | $0.02 |
| defillama | DefiLlama protocol TVL lookup / DeFi protocol metadata. | $0.02 |
| gas-api | Estimates blockchain gas fees with EIP-1559 tiers for Base, Ethereum, Optimism, and Arbitrum. | $0.02 |
| gas-fees | Estimates EIP-1559 transaction fees on Base, Ethereum, Optimism, and Arbitrum. | $0.02 |
| gas-now-base | Real-time gas price oracle for Base, Ethereum, Optimism, Arbitrum, and Polygon. | $0.02 |
SEE ALSO