{"uid":"cap_iMXS3GRs90l7N9v0H4xRs","slug":"delx-commerce-gas-cost-usd-calculator-a176c0f5","name":"Delx Commerce Gas Cost USD 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-usd?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"eth_usd":{"type":"integer","description":"Input field: eth usd."},"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-usd/v1","eth_usd":3000,"cost_eth":0.000021,"cost_usd":0.063,"gas_used":21000}},"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_7ARAM0ijAD3qWtDbV64Gs","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 USD cost of an Ethereum transaction given gas used, gas price in wei, and current ETH/USD price","exampleAgentPrompt":"What's the USD cost of an Ethereum transaction that used 21000 gas at a gas price of 5000000000 wei, with ETH currently at $3000?","exampleUseCases":[{"title":"On-chain transaction fee audit","prompt":"I just submitted an ETH transaction that used 45000 gas at a gas price of 8000000000 wei. ETH is trading at $3200 right now — what did that transaction cost me in USD?"},{"title":"DeFi agent gas budget check","prompt":"Before I submit this swap, can you tell me the USD cost of a transaction using 150000 gas at 12000000000 wei with ETH at $2800, so I can decide if it's worth it?"},{"title":"Gas price comparison for wallet tooling","prompt":"Compare the USD cost for a standard ETH transfer at 21000 gas — one at 3000000000 wei and one at 10000000000 wei — assuming ETH is $3500."}],"resultDescription":"Returns a JSON object with the schema identifier 'delx/util-gas-cost-usd/v1', including the ETH/USD price used, the transaction cost expressed in ETH (cost_eth), the transaction cost expressed in USD (cost_usd), and the gas_used figure, allowing the caller to confirm and display the full cost breakdown.","failureModes":["Missing required fields (eth_usd, gas_used, gas_price_wei) return a 4xx validation error","Non-numeric or malformed gas_price_wei string may cause parsing failure","Extremely large gas_used or gas_price_wei values may produce overflow or unexpected results","Payment failure via x402 (insufficient USDC balance or unsupported network) blocks the request","Service unavailability returns a 5xx error"],"whenToPreferThis":"Choose this endpoint when an agent needs a quick, pay-per-use, no-signup computation of Ethereum transaction costs in USD from raw gas parameters (gas used, gas price in wei, ETH/USD price). It is ideal for on-chain agents, DeFi bots, wallet tools, or portfolio trackers that need verifiable, deterministic fee calculations without maintaining their own conversion logic. Prefer it over building custom gas math when you need a simple API call with exact pricing and USDC micropayment settlement on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:41.301Z","isFirstParty":false,"canonicalSlug":"delx-commerce-gas-cost-usd-calculator-a176c0f5"}