{"uid":"cap_VWFZh7mZpQLWXi_D06ZWS","slug":"gas-cost-in-usd-ba7c9856","name":"Gas Cost in USD","description":"Estimate gas cost in USD given used gas, price, and ETH/USD. Call when operator reports that need approximate dollar gas spend. Returns usd cost estimate (caller supplies eth price) as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/gas-cost-usd","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_v7UnfGYcc6SKNReCZpXQW","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":"Estimates the USD cost of an Ethereum transaction given gas used, gas price in wei, and a caller-supplied ETH/USD price, using pure local arithmetic with no external calls.","exampleAgentPrompt":"A transaction used 150000 gas at a gas price of 12000000000 wei, and ETH is currently worth $3200 — what's the estimated dollar cost of that gas?","exampleUseCases":[{"title":"Post-trade gas cost accounting","prompt":"My on-chain swap used 180000 gas at 8 gwei and ETH is at $3100 right now — what did the gas cost me in USD?"},{"title":"Pre-flight gas budget check","prompt":"Before I submit this transaction, can you estimate the dollar gas cost? It'll use about 250000 gas at 15 gwei, and I'll treat ETH as $2800."},{"title":"Agent fleet cost monitoring","prompt":"For the last 10 transactions my agent submitted, they each used around 65000 gas at 10 gwei — with ETH at $3500, what's the USD gas cost per transaction?"}],"resultDescription":"A deterministic JSON response containing the estimated USD gas cost, computed locally from the supplied gas_used, gas_price_wei, and eth_usd values — no live market data or RPC calls involved. The result is advisory only and reflects the caller's supplied ETH price.","failureModes":["Missing required fields (gas_used, gas_price_wei, or eth_usd) result in a validation error","Non-numeric or malformed gas_price_wei string causes a parsing error","Zero or negative eth_usd price may produce a zero or nonsensical result","Result may diverge from actual on-chain cost if caller-supplied ETH price is stale"],"whenToPreferThis":"Choose this endpoint when you need a fast, purely local, deterministic USD gas cost calculation and you already have the gas_used, gas_price_wei, and an ETH/USD price on hand. Prefer it over live-feed approaches when you want no external dependencies, no API keys, and reproducible results — e.g. for post-trade accounting, pre-flight budget checks, or cost summaries in agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:57:21.750Z","isFirstParty":false}