# ChainRay Gas Average Oracle

> ChainRay Gas Average Oracle is a paid API for AI agents from chainray.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns the average gas fee for a specified blockchain network in real-time

## Facts

- Endpoint: GET https://chainray.online/oracle/gas-avg
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainray-gas-average-oracle-800dbdc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__a2UaiZ3y5zHGwcnL-O1B

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 chainray-gas-average-oracle-800dbdc3
```

Example prompt: What's the current average gas fee on Ethereum right now? I want to know if it's a good time to submit a transaction.

## When to prefer this

Use this endpoint when an AI agent needs to check current average gas fees on a specific blockchain before submitting a transaction, estimating costs, or advising a user on timing. Prefer this over manual RPC calls when you need a normalized, multi-chain gas oracle with pay-per-request pricing and no subscription overhead.

## Known failure modes

- Unsupported chain identifier returns an error or empty result
- Missing chain parameter may default to a single chain or return an error
- Payment of $0.005 USDC not received results in HTTP 402 rejection
- Network downtime or RPC issues may cause stale or unavailable gas data
- Invalid chain string returns a validation error

## How this service works

The most complete blockchain data and intelligence service for AI agents. 93 endpoints across 46 chains, from gas fees to DeFi analytics, with real-time streams, intent routing, and verifiable proofs. Pay-per-request via x402.

## Output

Returns the average gas price for the requested blockchain network, likely including values in Gwei or native units, along with the chain identifier and timestamp of the measurement.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum"
  }
 }
}
```

## 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",
     "properties": {
      "chain": {
       "type": "string",
       "description": "Blockchain network (e.g., base, ethereum, polygon)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainray-gas-average-oracle-800dbdc3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainray.online](https://www.zero.xyz/host/chainray.online/llms.txt)
