# Base Gas Oracle

> Base Gas Oracle is a paid API for AI agents from stall-row-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Returns live Base network gas metrics in one call: current gas price, base fee, 20-block base-fee range, fee trend direction, and a cheap-window timing hint.

## Facts

- Endpoint: POST https://stall-row-production.up.railway.app/v1/gas-oracle?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-gas-oracle-015b129b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zsnopHJ1IwDX6T62FQaCQ

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 base-gas-oracle-015b129b -d '<json body>'
```

Example prompt: What are gas fees like on Base right now — is it a good time to send a transaction, or should I wait for them to drop?

## When to prefer this

Use this endpoint when an agent needs to make a real-time gas timing decision on the Base network, especially when cost optimization matters. It bundles gas price, base fee, trend analysis, and a timing hint into a single call, avoiding the need to query multiple RPC endpoints or compute rolling statistics manually. Prefer it over raw RPC calls when you want a human-readable trend and cheapest-window recommendation out of the box.

## Known failure modes

- RPC node unavailable — may return 5xx or stale data
- Network congestion causing delayed block data
- Incorrect method type returns 400 validation error
- Service downtime on Railway deployment returns 503

## How this service works

Current Base gas in one call: the live gas price, the current base fee, the base-fee range across the last 20 blocks, whether fees are rising, falling, or flat, and a cheap-window hint drawn from that data. Use this when an agent wants to time a transaction instead of paying whatever the moment charges.

## Output

A JSON object containing: the chain identifier, the latest block number, current gas price in gwei, current base fee in gwei, min and max base fee across the last 20 blocks, number of blocks sampled, fee trend direction (rising/falling/flat), a cheapest-window hint string, the epoch timestamp of the reading, and an optional note.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "schema": {
     "type": "object"
    },
    "example": {
     "type": "object",
     "required": [
      "chain",
      "latest_block",
      "gas_price_gwei",
      "base_fee_gwei",
      "trend",
      "cheapest_window_hint"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "chain": {
       "type": "string"
      },
      "trend": {
       "enum": [
        "rising",
        "falling",
        "flat"
       ],
       "type": "string"
      },
      "as_of_epoch": {
       "type": "integer"
      },
      "latest_block": {
       "type": "integer"
      },
      "base_fee_gwei": {
       "type": "string"
      },
      "blocks_sampled": {
       "type": "integer"
      },
      "gas_price_gwei": {
       "type": "string"
      },
      "cheapest_window_hint": {
       "type": "string"
      },
      "base_fee_max_gwei_20_blocks": {
       "type": "string"
      },
      "base_fee_min_gwei_20_blocks": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-gas-oracle-015b129b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stall-row-production.up.railway.app](https://www.zero.xyz/host/stall-row-production.up.railway.app/llms.txt)
