# TokenGuard Gas History API

> TokenGuard Gas History API is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns historical gas price data for blockchain networks, useful for DeFi analytics and transaction cost analysis

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/gas_history
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-gas-history-api-612553a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kFPLXv4sU2QDGoQ8rf2O4

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 tokenguard-gas-history-api-612553a4 -d '<json body>'
```

Example prompt: Can you pull the gas price history for Ethereum over the past 7 days so I can see how fees have been trending and figure out the cheapest time to make a transaction?

## When to prefer this

Choose this endpoint when you need historical gas price data for on-chain cost analysis, DeFi strategy optimization, or transaction timing decisions. It is part of the broader TokenGuard crypto/DeFi data suite, making it ideal when you are already using other TokenGuard endpoints for ERC-20 safety or market data and want consistent data provenance.

## Known failure modes

- Invalid or unsupported network identifier returns an error
- Date/block range too large may result in timeout or truncated data
- Missing required parameters (network, time range) returns 400-level error
- Payment failure via x402 micropayment blocks request
- Hugging Face Space may be cold-started, causing initial latency spike

## How this service works

gas history data for AI agents.

## Output

A JSON object containing a time series of historical gas prices (in gwei or equivalent units), including timestamps and fee levels across the requested period for the specified blockchain network

## 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": {
     "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"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-gas-history-api-612553a4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
