# 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 requested speed tier, payable via x402.

## Facts

- Endpoint: GET https://baseshield-x402-ojil.vercel.app/v1/gas
- 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-5289d877
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rO8qFs3H29t2BI1I-ezIB

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-5289d877
```

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

## When to prefer this

Use this endpoint when you need live, EIP-1559-compatible gas fee estimates specifically for Base Mainnet and want a speed-tiered recommendation (slow/standard/fast/instant) rather than computing fees from raw RPC data yourself. Prefer it over generic gas trackers when building agents or bots that transact on Base and need reliable, structured gwei values ready to plug into transaction parameters.

## Known failure modes

- Invalid speed enum value returns an error
- x402 payment failure if USDC balance is insufficient or payment header is malformed
- Network RPC unavailability causes stale or missing fee data
- Rate limiting if payment is not properly attached

## How this service works

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

## Output

Returns a JSON object with the network identifier ('base'), the current base fee in gwei, the suggested maxFeePerGas in gwei, and the suggested maxPriorityFeePerGas in gwei — all calibrated to the requested speed tier (slow, standard, fast, or instant).

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "network",
      "source",
      "suggestions",
      "base_fee_wei",
      "timestamp"
     ],
     "properties": {
      "source": {
       "type": "string"
      },
      "network": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "chain_id": {
       "type": "integer"
      },
      "timestamp": {
       "type": "string",
       "format": "date-time"
      },
      "suggestions": {
       "type": "object",
       "required": [
        "slow",
        "standard",
        "fast",
        "instant"
       ],
       "properties": {
        "fast": {
         "type": "object",
         "required": [
          "max_priority_fee_per_gas_gwei",
          "max_fee_per_gas_gwei",
          "max_priority_fee_wei",
          "max_fee_wei",
          "estimated_wait_blocks"
         ],
         "properties": {
          "max_fee_wei": {
           "type": "integer"
          },
          "max_fee_per_gas_gwei": {
           "type": "number"
          },
          "max_priority_fee_wei": {
           "type": "integer"
          },
          "estimated_wait_blocks": {
           "type": "integer"
          },
          "max_priority_fee_per_gas_gwei": {
           "type": "number"
          }
         }
        },
        "slow": {
         "type": "object",
         "required": [
          "max_priority_fee_per_gas_gwei",
          "max_fee_per_gas_gwei",
          "max_priority_fee_wei",
          "max_fee_wei",
          "estimated_wait_blocks"
         ],
         "properties": {
          "max_fee_wei": {
           "type": "integer"
          },
          "max_fee_per_gas_gwei": {
           "type": "number"
          },
          "max_priority_fee_wei": {
           "type": "integer"
          },
          "estimated_wait_blocks": {
           "type": "integer"
          },
          "max_priority_fee_
… (truncated)
```

## 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-5289d877/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)
