{"uid":"cap_7V3l-_2T04fXVf0noCtqN","slug":"contractlens-gas-price-endpoint-99099e67","name":"ContractLens Gas Price Endpoint","description":"Smart contract security scan for AI agents: give a chain id and contract address, get Slither static-analysis findings (reentrancy, unchecked calls, arbitrary sends, etc.), proxy/upgradeability status and the list of owner/role-gated admin functions (mint, pause, blacklist, upgrade). Works on any Sourcify-verified contract on Ethereum, Base, Arbitrum, Optimism, Polygon, BNB. Use before approving, depositing into or trading a token/protocol. Unverified contracts are rejected without charge.","url":"https://contractlens-api.appin60.com/gas?utm_source=zero.xyz","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":["chainId"],"properties":{"chainId":{"type":"string","description":"EVM chain id: 1 Ethereum, 8453 Base, 42161 Arbitrum, 10 Optimism, 137 Polygon, 56 BNB"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"chain":"Base","tiers":{"standard":{"maxFeePerGasGwei":0.011,"maxPriorityFeePerGasGwei":0.001}},"baseFeeGwei":0.005,"estimatedCostNativeAtStandard":{"ethTransfer":1.3e-7,"uniswapSwap":0.0000011}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jdwCk6KMY3E_JdslzsNt0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current EVM gas prices (base fee, max fee, priority fee) and estimated transaction costs for a given chain","exampleAgentPrompt":"What are the current gas prices on Base right now, including base fee and estimated cost for an ETH transfer and a Uniswap swap?","exampleUseCases":[{"title":"Pre-trade gas cost check","prompt":"Before I do a Uniswap swap on Arbitrum, can you check what the current gas fees look like and estimate how much the swap will cost me?"},{"title":"Multi-chain gas comparison","prompt":"What are the current base fees and max gas prices on Ethereum mainnet and Polygon so I can decide which chain is cheaper to transact on right now?"},{"title":"Automated transaction timing","prompt":"Check the current gas fees on Optimism for me — I want to know the base fee in Gwei and the estimated cost of an ETH transfer before I send funds."}],"resultDescription":"Returns a JSON object with the chain name, current base fee in Gwei, tiered max fee per gas and max priority fee per gas (standard tier), and estimated costs in native ETH for common transaction types like ETH transfers and Uniswap swaps.","failureModes":["Unsupported or invalid chain ID returns an error","Network unavailability for the requested chain causes failure","Missing required chainId parameter returns a validation error"],"whenToPreferThis":"Use this endpoint when you need real-time gas price data for EVM-compatible chains (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB) before executing or recommending a transaction. It is especially useful for estimating transaction costs in native ETH before approving a swap, transfer, or DeFi interaction. Choose this over generic gas APIs when you are already using ContractLens for contract security checks and want a unified workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T06:30:35.930Z","isFirstParty":false,"canonicalSlug":"contractlens-gas-price-endpoint-99099e67"}