# Toolsmith Gas Price & Latest Block

> Toolsmith Gas Price & Latest Block is a paid API for AI agents from toolsmith-api.dassad10.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns the current gas price and latest block number for Base or Ethereum mainnet, fetched live from public RPC nodes and cached for up to 15 seconds.

## Facts

- Endpoint: GET https://toolsmith-api.dassad10.workers.dev/t/crypto/gas
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toolsmith-gas-price-latest-block-68de27ef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8ZXWPZqPZqLqs7e-EAVjm

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 toolsmith-gas-price-latest-block-68de27ef
```

Example prompt: What's the current gas price and latest block on Base mainnet right now?

## When to prefer this

Use this endpoint when you need a quick, low-cost, keyless lookup of current gas prices or the latest block number on Ethereum mainnet or Base. Ideal for agents that need to estimate transaction costs, check network congestion, or timestamp actions against chain state without setting up an RPC provider or API key. At $0.002 per call via x402, it's suitable for frequent polling or on-demand checks.

## Known failure modes

- Missing or invalid 'chain' query parameter — returns error since it is required and must be 'base' or 'ethereum'
- Payment not completed via x402 protocol — returns 402 Payment Required
- Upstream RPC node timeout or unavailability — may return 5xx error
- Stale data beyond 15-second cache window if RPC is degraded

## How this service works

Current gas price and latest block for Base or Ethereum mainnet, straight from public RPC. Fresh within 15 seconds. JSON response. $0.002 USDC per call, pay via x402, no API key.

## Output

A JSON object containing the current gas price (likely in wei or gwei) and the latest block number for the requested chain (either 'base' or 'ethereum'), sourced directly from public RPC and fresh within 15 seconds.

## 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": [
      "chain"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string",
       "description": "Chain to query"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "blockNumber": 32456789,
  "gasPriceWei": "5150000",
  "gasPriceGwei": 0.00515
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toolsmith-gas-price-latest-block-68de27ef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolsmith-api.dassad10.workers.dev](https://www.zero.xyz/host/toolsmith-api.dassad10.workers.dev/llms.txt)
