# Blockchain.info Total Bitcoins Chart API

> Blockchain.info Total Bitcoins 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 a time-series chart of the total number of bitcoins that have been mined over a specified period

## Facts

- Endpoint: POST https://api.blockchain.info/explorer-gateway-kt/x402/charts/total-bitcoins?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-total-bitcoins-chart-api-c366c127
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e6G4TdPeEGZJA_oBXHkmR

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-total-bitcoins-chart-api-c366c127 -d '<json body>'
```

Example prompt: Pull the total bitcoins mined chart from Blockchain.com for the past 3 years with a 24-hour rolling average, sampled to reduce data points.

## When to prefer this

Choose this endpoint when you need historical time-series data specifically about the cumulative total number of bitcoins mined, sourced directly from Blockchain.com's explorer data. It is ideal for supply-side Bitcoin analytics, issuance trend research, and charting circulating supply over custom timespans. Prefer this over generic crypto price APIs when the goal is supply-curve analysis rather than price or transaction data.

## Known failure modes

- Invalid timespan format returns an error or empty values array
- Unsupported chart format enum value results in a 400 bad request
- Network or gateway timeout if the blockchain data backend is slow
- Payment failure (402) if x402 payment is not properly submitted
- Malformed rollingAverage string may return default behavior or error

## How this service works

Paid AI-agent access to Blockchain.com Explorer API

## Output

A JSON object containing the chart name ('Total Bitcoins'), unit ('BTC'), period granularity (e.g. 'day'), a status field, a human-readable description, and an array of {x: Unix timestamp, y: total BTC mined} data points covering the requested timespan with the specified rolling average applied.

## 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 Bitcoins",
  "unit": "BTC",
  "period": "day",
  "status": "ok",
  "values": [
   {
    "x": 1704067200,
    "y": 19589375
   },
   {
    "x": 1704153600,
    "y": 19589500
   }
  ],
  "description": "The total number of bitcoins that have been mined"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-info-total-bitcoins-chart-api-c366c127/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)
