# BaseGas Oracle x402

> BaseGas Oracle x402 is a paid API for AI agents from baseshield-x402-ojil.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-18).

Returns real-time EIP-1559 gas fee estimates (base fee, max fee, priority fee) for Base Mainnet at a chosen transaction speed tier, payable via x402.

## Facts

- Endpoint: POST https://baseshield-x402-ojil.vercel.app/v1/estimate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basegas-oracle-x402-1977ed80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mjp7Ygp6TpKRlZy3lRpSI

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 basegas-oracle-x402-1977ed80 -d '<json body>'
```

Example prompt: What are the current EIP-1559 gas fees on Base Mainnet for a fast transaction — give me the base fee, suggested max fee, and priority fee in gwei?

## When to prefer this

Choose this endpoint when you need real-time, tiered EIP-1559 gas fee estimates specifically for Base Mainnet and want a simple speed-based abstraction (slow/standard/fast/instant) rather than computing raw fee parameters yourself. Prefer it over generic Ethereum gas oracles when building Base-specific dApps, wallets, or trading bots that require accurate L2 fee data.

## Known failure modes

- Invalid speed enum value returns a 400 error
- Payment not completed via x402 returns a 402 Payment Required response
- Base Mainnet RPC downtime may result in stale or unavailable fee data
- Network congestion spikes may cause fee estimates to be outdated by the time the transaction is submitted

## How this service works

Real-Time EIP-1559 Gas Estimation and Fee History Oracle for Base Mainnet, payable via x402.

## Output

A JSON object containing the network name (e.g. 'base-mainnet'), the current base fee in gwei, the suggested EIP-1559 max fee in gwei, and the suggested priority fee (miner tip) in gwei for the requested speed tier.

## 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",
    "body",
    "bodyType"
   ],
   "properties": {
    "body": {
     "type": "object",
     "title": "EstimateRequest",
     "properties": {
      "speed": {
       "enum": [
        "slow",
        "standard",
        "fast",
        "instant"
       ],
       "type": "string",
       "title": "Speed",
       "default": "standard",
       "description": "Transaction urgency."
      }
     }
    },
    "type": {
     "const": "http"
    },
    "method": {
     "const": "POST"
    },
    "bodyType": {
     "const": "json"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "network",
      "source",
      "selected_tier",
      "timestamp"
     ],
     "properties": {
      "source": {
       "type": "string"
      },
      "network": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "timestamp": {
       "type": "string",
       "format": "date-time"
      },
      "base_fee_gwei": {
       "type": "number"
      },
      "selected_tier": {
       "enum": [
        "slow",
        "standard",
        "fast",
        "instant"
       ],
       "type": "string"
      },
      "congestion_level": {
       "type": "string"
      },
      "blob_base_fee_gwei": {
       "type": [
        "number",
        "null"
       ]
      },
      "max_fee_per_gas_gwei": {
       "type": "number"
      },
      "max_priority_fee_per_gas_gwei": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "network": {
   "type": "string"
  },
  "base_fee_gwei": {
   "type": "number"
  },
  "suggested_max_fee_gwei": {
   "type": "number"
  },
  "suggested_priority_fee_gwei": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basegas-oracle-x402-1977ed80/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from baseshield-x402-ojil.vercel.app](https://www.zero.xyz/host/baseshield-x402-ojil.vercel.app/llms.txt)
