# Seneschal Fee History Export

> Seneschal Fee History Export is a paid API for AI agents from api.seneschal.space, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Returns per-block Ethereum base fee and blob fee history (up to 1024 blocks) as CSV or JSON lines, sourced directly from eth_feeHistory consensus data

## Facts

- Endpoint: GET https://api.seneschal.space/v1/premium/fee-history.csv
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/seneschal-fee-history-export-d17afa81
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cb1thGtyjbcbip84by3H5

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 seneschal-fee-history-export-d17afa81
```

Example prompt: Pull me the last 500 blocks of Ethereum base fee and blob fee history in CSV format — I want block number, base fee in gwei, gas used ratio, blob base fee, and blob gas used ratio.

## When to prefer this

Use this endpoint when you need bulk historical Ethereum fee data (base fee + blob fee) for multiple blocks in a single call, especially when you want CSV or JSONL output ready for analysis or storage. Prefer this over a single-block lookup when you need trend analysis, charting, or archiving. It is the canonical feed on Seneschal for fee history and supports pagination for walking further back in history.

## Known failure modes

- blocks parameter out of range (>1024 or <1) — likely 400 error
- invalid block number passed to `newest` — bad request
- payment not included or insufficient — 402 Payment Required
- service unavailable or consensus node unreachable — 503
- requesting a block range far in the past that exceeds node history — partial or empty response

## How this service works

Per-block base-fee + blob-fee history export — the top-requested feed on the Seneschal data board. Up to 1024 blocks per call (?blocks=, default 300) straight from consensus via eth_feeHistory, as CSV or JSON lines (?format=csv|jsonl). Columns: block, base fee (wei + gwei), gas_used_ratio, blob base fee, blob_gas_used_ratio. Page backwards with ?newest=<block>; headers carry the consensus next-block projection. Live "gas right now" fact: GET /v1/q/base-fee ($0.001).

## Output

A CSV or JSONL file with one row per block containing: block number, base fee in wei, base fee in gwei, gas_used_ratio, blob base fee, and blob_gas_used_ratio. Response headers include the consensus next-block base fee projection. Up to 1024 rows per call; paginate backwards using the oldest_block-1 as the `newest` parameter on the next call.

## 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": {
      "blocks": {
       "type": "integer",
       "description": "How many blocks (1..1024, default 300)."
      },
      "format": {
       "type": "string",
       "description": "csv (default) or jsonl."
      },
      "newest": {
       "type": "string",
       "description": "\"latest\" (default) or a block number — page backwards by passing oldest_block-1 of the previous page."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "string",
     "description": "text/csv or application/jsonl; one row per block."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "block,base_fee_wei,base_fee_gwei,gas_used_ratio,blob_base_fee_wei,blob_base_fee_gwei,blob_gas_used_ratio\n23012001,747213960,0.74721396,0.4993,1,0.000000001,0.25\n"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/seneschal-fee-history-export-d17afa81/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.seneschal.space](https://www.zero.xyz/host/api.seneschal.space/llms.txt)
