{"uid":"cap_l4k4aj5OH1iXgTG9MRfnz","slug":"blockchain-gas-estimation-api-623490b4","name":"Blockchain Gas Estimation API","description":"Estimate the gas a transaction will use via eth_estimateGas — the pre-send read every tx-building, trading and settlement agent makes to size gas and avoid out-of-gas reverts. Pass from/to/value/data. Across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. Free public RPC; undercuts onesource at $0.001 on 6 chains.","url":"https://store.agentexchange.work/chain/estimate-gas","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["to"],"properties":{"to":{"type":"string","description":"Recipient/contract address (0x...)"},"data":{"type":"string","description":"Calldata (0x...)"},"from":{"type":"string","description":"Sender address (0x...)"},"chain":{"type":"string","description":"base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"},"value":{"type":"string","description":"Wei value, hex or decimal (default 0)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"gas":{"type":"number"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nfw7yY8ZXA73utZZj5Z00","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates the gas required for an Ethereum-compatible transaction on a specified chain given a recipient, optional calldata, and optional value","exampleAgentPrompt":"Estimate the gas needed to call contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Base with calldata 0xa9059cbb000000000000000000000000recipient00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000 — what gas limit should I use?","exampleUseCases":null,"resultDescription":"Returns a JSON object with a `gas` field (integer number of gas units) and a `chain` field confirming which network the estimate was computed for (e.g. {\"gas\": 21000, \"chain\": \"base\"}).","failureModes":["Missing required `to` address returns a 4xx validation error","Invalid or malformed address format causes a bad request error","Unsupported chain value (not one of base/ethereum/optimism/arbitrum/polygon/gnosis) may return an error or default to base","Reverting calldata may cause the simulation to fail and return an error rather than a gas estimate","Payment of 0.001 USDC not provided or rejected by x402 returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-call gas estimate on EVM chains (Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis) without setting up API keys or a node provider. Ideal for AI agents that need to pre-flight transactions, set accurate gas limits, or budget transaction costs before execution. Prefer over running a local eth_estimateGas call when you lack a direct RPC connection.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:53.838Z","isFirstParty":false}