{"uid":"cap_R3ZwZY7ihG-ufwhrS2unb","slug":"x402-deployer-x402-deployer-workers-dev-cded826b","name":"EIP-1559 Gas Price Estimator & Pre-Transaction Cost Calculator","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-deployer.x402-deployer.workers.dev/gas-price","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":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_ePv4PRjBQVWJlCIBOJrTI","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":"Reads the latest block on Base, Ethereum, Optimism, or Arbitrum to derive base fee, suggest priority fees for safe-low/standard/fast tiers, compute maxFeePerGas, and convert estimated transaction costs to USD.","exampleAgentPrompt":"What are the current EIP-1559 gas fees on Ethereum mainnet right now — give me safe-low, standard, and fast tiers with the estimated USD cost for a standard ETH transfer?","exampleUseCases":null,"resultDescription":"Returns base fee from latest block, suggested priority fees (tip) for safe-low, standard, and fast tiers, computed maxFeePerGas for each tier, and estimated USD cost for common transaction types (e.g. ETH transfer, token transfer, contract deployment) on the requested EVM network.","failureModes":["Unsupported network specified — returns 400 with list of supported chains","RPC node unavailable or rate-limited — returns 502 or timeout","Latest block not yet available — stale data or retry needed","Invalid transaction type provided — returns 400 with supported types","Price feed unavailable — USD conversion may be missing or approximate"],"whenToPreferThis":"Use this endpoint when you need real-time EIP-1559 gas estimates across Base, Ethereum, Optimism, or Arbitrum, especially when you need USD cost conversion for user-facing displays or pre-flight transaction cost checks. Prefer this over raw RPC calls when you need structured tier breakdowns (safe-low/standard/fast) without writing custom fee logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:47:43.754Z","isFirstParty":false}