# ContractLens Gas Price Endpoint

> ContractLens Gas Price Endpoint is a paid API for AI agents from contractlens-api.appin60.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-14).

Returns current EVM gas prices (base fee, max fee, priority fee) and estimated transaction costs for a given chain

## Facts

- Endpoint: GET https://contractlens-api.appin60.com/gas?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contractlens-gas-price-endpoint-99099e67
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7V3l-_2T04fXVf0noCtqN

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 contractlens-gas-price-endpoint-99099e67
```

Example prompt: What are the current gas prices on Base right now, including base fee and estimated cost for an ETH transfer and a Uniswap swap?

## When to prefer this

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.

## Known failure modes

- Unsupported or invalid chain ID returns an error
- Network unavailability for the requested chain causes failure
- Missing required chainId parameter returns a validation error

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contractlens-gas-price-endpoint-99099e67/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from contractlens-api.appin60.com](https://www.zero.xyz/host/contractlens-api.appin60.com/llms.txt)
