# Blockchain.info Cost-Per-Transaction Chart API

> Blockchain.info Cost-Per-Transaction 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 cost-per-transaction chart data from Blockchain.com Explorer, with configurable timespan, rolling average, and output format

## Facts

- Endpoint: POST https://api.blockchain.info/explorer-gateway-kt/x402/charts/cost-per-transaction?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-cost-per-transaction-chart-api-5e5480fc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iTepGW7fKFO6_sW8l5Kqi

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-cost-per-transaction-chart-api-5e5480fc -d '<json body>'
```

Example prompt: Pull the Bitcoin cost-per-transaction chart data from Blockchain.com for the last 3 years in JSON format, using a 24-hour rolling average.

## When to prefer this

Choose this endpoint when you need authoritative, time-series Bitcoin cost-per-transaction data sourced directly from Blockchain.com Explorer. It is the right choice when you need flexible timespan control (hours to years), rolling average smoothing, and the option to export as JSON or CSV. Prefer this over third-party aggregators when you want data directly from one of the most established Bitcoin blockchain explorers, and when you need microsecond-current fee cost trend data for analytics, research, or monitoring dashboards.

## Known failure modes

- Invalid timespan format returns a 400 error
- Unsupported format enum value returns a 400 error
- Payment not provided or insufficient USDC balance returns a 402 Payment Required
- Network timeout or upstream Blockchain.com Explorer outage returns a 503
- Invalid rollingAverage window string returns a 400 error

## How this service works

Paid AI-agent access to Blockchain.com Explorer API

## Output

Returns structured JSON (or raw CSV) containing a time-series of Bitcoin cost-per-transaction values. JSON responses include timestamps, values, and optionally metadata about the chart (units, description, etc.). CSV responses contain two columns: timestamp and value. Data may be sampled to reduce point density depending on the sampled parameter.

## 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": "Cost per Transaction",
  "unit": "USD",
  "period": "day",
  "status": "ok",
  "values": [
   {
    "x": 1704067200,
    "y": 98.42
   },
   {
    "x": 1704153600,
    "y": 101.77
   }
  ],
  "description": "A chart showing miners revenue divided by the number of transactions."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-info-cost-per-transaction-chart-api-5e5480fc/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)
