# Delx Commerce Gas Cost USD Calculator

> Delx Commerce Gas Cost USD Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the USD cost of an Ethereum transaction given gas used, gas price in wei, and current ETH/USD price

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/gas-cost-usd?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-gas-cost-usd-calculator-a176c0f5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iMXS3GRs90l7N9v0H4xRs

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-commerce-gas-cost-usd-calculator-a176c0f5 -d '<json body>'
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-gas-cost-usd/v1",
  "eth_usd": 3000,
  "cost_eth": 0.000021,
  "cost_usd": 0.063,
  "gas_used": 21000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-gas-cost-usd-calculator-a176c0f5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
