# Blockchain.info Transaction Fees USD Chart API

> Blockchain.info Transaction Fees USD Chart API is a paid API for AI agents from api.blockchain.info, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Returns historical Bitcoin transaction fee data in USD as a time-series chart from the Blockchain.com Explorer

## Facts

- Endpoint: POST https://api.blockchain.info/explorer-gateway-kt/x402/charts/transaction-fees-usd?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockchain-info-transaction-fees-usd-chart-api-935734ea
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zmXnasazzx750QpsUB0mz

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 blockchain-info-transaction-fees-usd-chart-api-935734ea -d '<json body>'
```

Example prompt: Pull me the Blockchain.com Explorer chart of Bitcoin transaction fees in USD for the past year, using an 8-hour rolling average, and return it as JSON.

## When to prefer this

Choose this endpoint when you need historical Bitcoin transaction fee data denominated in USD with flexible time ranges and rolling average smoothing, sourced directly from the authoritative Blockchain.com Explorer. It is ideal for trend analysis, charting, and monitoring on-chain fee conditions without building your own data aggregation pipeline. Prefer it over generic crypto data APIs when you specifically want Blockchain.com's Explorer dataset with configurable sampling and averaging.

## Known failure modes

- Invalid timespan format returns an error (must use formats like '24h', '7d', '1y')
- Invalid rollingAverage window format causes request failure
- Unsupported format enum value (anything other than 'json' or 'csv') returns an error
- Payment failure or insufficient USDC balance results in 402 response
- Upstream Blockchain.com Explorer data unavailability may return 503 or empty dataset
- Very short timespans with high granularity may return sparse or empty data

## How this service works

Paid AI-agent access to Blockchain.com Explorer API

## Output

A JSON or CSV time-series dataset of Bitcoin transaction fees denominated in USD, with configurable timespan (e.g. 24h, 7d, 1y, 3y), optional rolling average smoothing, optional metadata fields, and optional sampling to reduce data point density. JSON responses include structured metadata and value arrays; CSV responses contain raw timestamp-value columns.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cors": {
   "type": "boolean",
   "default": false,
   "description": "Enable CORS headers"
  },
  "format": {
   "enum": [
    "json",
    "csv"
   ],
   "type": "string",
   "default": "json",
   "description": "Response format:\n- `json` — Returns structured JSON with metadata and values\n- `csv` — Returns raw CSV data with timestamp and value columns (no metadata)\n"
  },
  "sampled": {
   "type": "boolean",
   "default": true,
   "description": "Apply sampling to reduce data points"
  },
  "metadata": {
   "type": "boolean",
   "default": false,
   "description": "Include metadata in response"
  },
  "timespan": {
   "type": "string",
   "default": "1y",
   "example": "1y",
   "description": "Time period (e.g., \"24h\", \"7d\", \"1y\", \"3y\")"
  },
  "rollingAverage": {
   "type": "string",
   "default": "8h",
   "example": "8h",
   "description": "Rolling average window (e.g., \"8h\", \"24h\")"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "format": "application/json",
 "example": {
  "name": "Total Transaction Fees in USD",
  "unit": "USD",
  "period": "day",
  "status": "ok",
  "values": [
   {
    "x": 1704067200,
    "y": 1176234.5
   },
   {
    "x": 1704153600,
    "y": 1332019.8
   }
  ],
  "description": "The total value of all transaction fees paid to miners (not including the coinbase value of block rewards)."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-info-transaction-fees-usd-chart-api-935734ea/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.blockchain.info](https://www.zero.xyz/host/api.blockchain.info/llms.txt)
