# ChainRay Gas History

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

Returns historical gas fee data and time-series for a specified blockchain network

## Facts

- Endpoint: GET https://chainray.online/gas-history
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainray-online-a972990c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R4yfbvH7SBV3raMJdpWAW

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-online-a972990c
```

Example prompt: Pull up the historical gas fee time-series data for the Base chain from ChainRay so I can see how transaction costs have trended.

## When to prefer this

Use this endpoint when you need historical gas fee data or time-series trends for a specific blockchain network (especially Base, Ethereum, Polygon). Prefer this over gas prediction endpoints when you need past data rather than forecasts, and over general blockchain explorers when you specifically need structured fee history in a machine-readable format for analytics or cost modeling.

## Known failure modes

- Unsupported chain identifier returns an error or empty dataset
- Missing or malformed chain query parameter may default to a specific chain or return a 400 error
- Payment not processed (x402 flow) results in a 402 Payment Required response
- Rate limiting or quota exceeded returns a 429 error
- Chain data temporarily unavailable returns a 503 or empty response

## 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

A time-series dataset of historical gas fees for the specified blockchain network, including gas price data points over time (e.g., gwei values, timestamps, and fee statistics for the requested chain such as Base or Ethereum).

## 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-online-a972990c/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)
