{"uid":"cap_SPchC3igljpO8B-y4p2Fp","slug":"x402-agentutility-gas-price-api-909e1619","name":"x402 AgentUtility Gas Price API","description":"Gas price API / EIP-1559 fee estimator / Base + Ethereum + Optimism + Arbitrum gas tracker / pre-tx cost estimator. 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.","url":"https://x402.agentutility.ai/gas-price?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{"chain":{"enum":["base","ethereum","optimism","arbitrum","polygon"],"type":"string","description":"EVM L1/L2 to read gas from. Default 'base'."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"chain":{"type":"string"},"cost_usd":{"type":"object","properties":{"nft_mint":{"type":"number"},"transfer":{"type":"number"},"uniswap_swap":{"type":"number"},"erc20_transfer":{"type":"number"}}},"timestamp":{"type":"string"},"block_number":{"type":"integer"},"base_fee_gwei":{"type":"number"},"eth_price_usd":{"type":"integer"},"priority_fee_gwei":{"type":"object","properties":{"fast":{"type":"number"},"safe_low":{"type":"number"},"standard":{"type":"number"}}},"total_recommended_gwei":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","cost_usd":{"nft_mint":0.006,"transfer":0.0008,"uniswap_swap":0.004,"erc20_transfer":0.0012},"timestamp":"2026-05-06T22:00:00Z","block_number":27500000,"base_fee_gwei":0.005,"eth_price_usd":3500,"priority_fee_gwei":{"fast":0.002,"safe_low":0.001,"standard":0.001},"total_recommended_gwei":0.006}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8XvhSsTIzuc_beLe2XAl-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates EIP-1559 gas fees for Base, Ethereum, Optimism, and Arbitrum chains, returning tiered priority fees, maxFeePerGas, and USD cost estimates for common transaction types.","exampleAgentPrompt":"What will a standard ERC-20 token transfer cost in gas fees right now on Ethereum — give me the base fee, suggested priority fee, and total USD cost for safe-low, standard, and fast confirmation tiers.","exampleUseCases":[{"title":"Pre-transaction cost check on Base","prompt":"Before I send this USDC transfer on Base, tell me the current gas price and how much it'll cost in USD at the standard and fast confirmation speeds."},{"title":"Multi-chain gas comparison for DeFi bot","prompt":"I'm about to execute a swap — what are the current gas fees on Ethereum, Arbitrum, and Optimism right now? Give me the EIP-1559 base fee and USD cost estimates so I can pick the cheapest chain."},{"title":"Gas spike monitoring for wallet app","prompt":"Check the current gas prices on Ethereum and let me know the base fee and the fast-tier maxFeePerGas — I want to know if it's a good time to send my transaction or if I should wait."}],"resultDescription":"Returns the latest block's base fee, suggested priority fees for safe-low, standard, and fast confirmation tiers, the computed maxFeePerGas for each tier, and USD cost estimates for common transaction types (e.g. ETH transfer, ERC-20 transfer, contract call) on the requested EVM-compatible chain.","failureModes":["Unsupported chain identifier returns an error or empty response","RPC node unavailability causes stale or missing block data","Extreme gas price volatility may make estimates outdated within seconds","Missing or malformed request body returns a 400 error","Payment failure via x402 protocol results in 402 response and no data returned"],"whenToPreferThis":"Choose this endpoint when an agent needs real-time, tiered EIP-1559 gas estimates with USD conversion across multiple EVM chains (Base, Ethereum, Optimism, Arbitrum) in a single call, especially when cost-in-dollars is required for user-facing display or pre-transaction decision-making. Prefer this over on-chain RPC calls when the agent lacks direct blockchain access or needs normalized, human-readable fee tiers without parsing raw block data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:43:49.825Z","isFirstParty":false,"canonicalSlug":"x402-agentutility-gas-price-api-909e1619"}