{"uid":"cap_alqze1Tg1teF_n91w4XhM","slug":"delx-commerce-gas-cost-eth-calculator-2107651c","name":"Delx Commerce Gas Cost ETH Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/gas-cost-eth?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"gas_used":{"type":"integer","description":"Input field: gas used."},"gas_price_wei":{"type":"string","description":"Input field: gas price wei."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-gas-cost-eth/v1","cost_eth":0.000021,"cost_wei":"21000000000000","gas_used":21000,"gas_price_wei":"1000000000"}},"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_LqMcMPLTOxOMOb4rvAelA","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":"Computes the ETH and wei cost of an Ethereum transaction given gas used and gas price in wei","exampleAgentPrompt":"Calculate the ETH cost for a transaction that used 21000 gas at a gas price of 1000000000 wei.","exampleUseCases":[{"title":"Transaction fee audit for DeFi app","prompt":"I processed a swap transaction that used 150000 gas at a gas price of 12000000000 wei — how much did that cost in ETH?"},{"title":"Gas cost display in wallet UI","prompt":"Show the user how much ETH they spent on a transaction that used 45000 gas units at 8500000000 wei per gas."},{"title":"Historical gas cost reconstruction","prompt":"I'm analyzing an old Ethereum transaction with 63000 gas used and a gas price of 25000000000 wei — what was the total fee in ETH and wei?"}],"resultDescription":"Returns a JSON object with the schema identifier 'delx/util-gas-cost-eth/v1', the transaction cost expressed in ETH as a decimal (cost_eth), the cost in wei as a string (cost_wei), and echoes back the input gas_used and gas_price_wei for verification.","failureModes":["Missing required fields (gas_used or gas_price_wei) returns an error response","Non-integer gas_used or non-string gas_price_wei may cause validation errors","Extremely large values for gas_price_wei could cause overflow or precision issues","Payment failure via x402 USDC protocol results in 402 response before computation occurs"],"whenToPreferThis":"Use this endpoint when you need a precise, on-demand computation of Ethereum transaction gas costs in ETH and wei without setting up local arithmetic — particularly useful inside agent workflows that need to display, log, or compare transaction fees without writing custom BigInt math. Ideal for pay-per-use agent pipelines where no API key or signup is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:47.042Z","isFirstParty":false,"canonicalSlug":"delx-commerce-gas-cost-eth-calculator-2107651c"}