# Bitcoin Stats API
> Live Bitcoin on-chain economics and network-activity statistics, built on the open blockchain.com dataset — the macro on-chain layer, not raw address or mempool lookups: a live network snapshot (24h transaction count and USD volume, hash rate, market price and cap, total mined supply, miners' revenue), the historical time series of any curated on-chain metric (active addresses, transaction volume, UTXO-set size, mempool size, miner revenue, fees and more), the catalog of available metrics, and Bitcoin's issuance state (total mined, share of the 21M cap, current block reward and estimated next halving).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bitcoinstats-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 3 req/s
- **Basic** ($8/Mo) — 146,000 calls/Mo, 8 req/s
- **Pro** ($25/Mo) — 906,000 calls/Mo, 15 req/s
- **Scale** ($61/Mo) — 4,760,000 calls/Mo, 30 req/s

## Endpoints

### Stats

#### `GET /v1/stats` — Live Bitcoin network economic snapshot

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitcoinstats-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "source": "blockchain.com",
        "timestamp": "2026-06-10T13:54:05.000Z",
        "difficulty": 138955357012247,
        "block_height": 953110,
        "hash_rate_ehs": 939.42,
        "blocks_size_mb": 221217900,
        "market_cap_usd": 1222456606896,
        "total_mined_btc": 20040968.75,
        "market_price_usd": 60997.88,
        "transactions_24h": 635975,
        "total_fees_btc_24h": 425,
        "miners_revenue_usd_24h": 0,
        "minutes_between_blocks": 10.15,
        "estimated_tx_volume_usd_24h": 6142243337
    },
    "meta": {
        "timestamp": "2026-06-10T14:00:06.899Z",
        "request_id": "a2fe069a-8e30-4e58-adad-1dea5af54999"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Metrics

#### `GET /v1/metric` — Historical time series of an on-chain metric

**Parameters:**
- `name` (query, required, string) — Metric name (see /v1/metrics) Example: `active-addresses`
- `days` (query, optional, string) — Days of history (1-365) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitcoinstats-api/v1/metric?name=active-addresses&days=30"
```

**Response:**
```json
{
    "data": {
        "days": 30,
        "unit": "addresses",
        "label": "Active addresses per day",
        "latest": {
            "date": "2026-06-04T00:00:00.000Z",
            "value": 538439
        },
        "metric": "active-addresses",
        "points": 25,
        "series": [
            {
                "date": "2026-05-11T00:00:00.000Z",
                "value": 457665
            },
            {
                "date": "2026-05-12T00:00:00.000Z",
                "value": 476383
            },
            {
                "date": "2026-05-13T00:00:00.000Z",
                "value": 485900
            },
            {
                "date": "2026-05-14T00:00:00.000Z",
                "value": 489856
            },
            {
                "date": "2026-05-15T00:00:00.000Z",
                "value": 525031
            },
            {
                "date": "2026-05-16T00:00:00.000Z",
                "value": 445624
            },
            {
                "date": "2026-05-17T00:00:00.000Z",
                "value": 396443
            },
            {
                "date": "2026-05-18T00:00:00.000Z",
                "value": 474167
            },
            {
                "date": "2026-05-19T00:00:00.000Z",
                "value": 469682
            },
            {
                "date": "2026-05-20T00:00:00.000Z",
                "value": 473582
            },
            {
                "date": "2026-05-21T00:00:00.000Z",
       
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/metrics` — The catalog of available on-chain metrics

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitcoinstats-api/v1/metrics"
```

**Response:**
```json
{
    "data": {
        "count": 14,
        "source": "blockchain.com",
        "metrics": [
            {
                "name": "active-addresses",
                "unit": "addresses",
                "label": "Active addresses per day"
            },
            {
                "name": "transactions",
                "unit": "transactions",
                "label": "Confirmed transactions per day"
            },
            {
                "name": "transaction-volume-usd",
                "unit": "USD",
                "label": "Estimated transaction volume"
            },
            {
                "name": "mempool-size",
                "unit": "transactions",
                "label": "Unconfirmed transactions in mempool"
            },
            {
                "name": "utxo-count",
                "unit": "outputs",
                "label": "Unspent transaction outputs (UTXO set)"
            },
            {
                "name": "hash-rate",
                "unit": "TH/s",
                "label": "Network hash rate"
            },
            {
                "name": "difficulty",
                "unit": "difficulty",
                "label": "Mining difficulty"
            },
            {
                "name": "miners-revenue-usd",
                "unit": "USD",
                "label": "Miners' revenue"
            },
            {
                "name": "transaction-fees-usd",
                "unit": "USD",
                "label": "Total tran
…(truncated, see openapi.json for full schema)
```

### Supply

#### `GET /v1/supply` — Bitcoin supply, issuance, block reward and next halving

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitcoinstats-api/v1/supply"
```

**Response:**
```json
{
    "data": {
        "source": "blockchain.com",
        "block_height": 953110,
        "halving_epoch": 4,
        "percent_mined": 95.4332,
        "remaining_btc": 959031.25,
        "max_supply_btc": 21000000,
        "total_mined_btc": 20040968.75,
        "next_halving_height": 1050000,
        "blocks_to_next_halving": 96890,
        "current_block_reward_btc": 3.125,
        "est_days_to_next_halving": 672.8
    },
    "meta": {
        "timestamp": "2026-06-10T14:00:07.506Z",
        "request_id": "e33c2564-ecd7-4c20-8891-abbd4d417a8d"
    },
    "status": "ok",
    "message": "Supply retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata and endpoint catalog

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bitcoinstats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "blockchain.com statistics API (live)",
        "service": "bitcoinstats-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/stats": "Live Bitcoin network economic snapshot.",
            "GET /v1/metric": "Historical time series of an on-chain metric (name=active-addresses, days=30).",
            "GET /v1/supply": "Bitcoin supply, issuance, block reward and next halving.",
            "GET /v1/metrics": "The catalog of available on-chain metrics."
        },
        "description": "Live Bitcoin on-chain economics and network-activity statistics as an API, built on the open blockchain.com dataset — the macro on-chain layer, not raw address/transaction/mempool lookups. The stats endpoint returns a live network snapshot (24h transaction count and USD volume, hash rate, market price and cap, total mined supply, miners' revenue); the metric endpoint returns the historical time series of any curated on-chain metric (active addresses, transaction volume, UTXO-set size, mempool size, miner revenue, fees and more); the metrics endpoint lists the available metrics; the supply endpoint returns Bitcoin's issuance state (total mined, share of the 21M cap, current block reward, estimated next halving). Live, no key, nothing stored. Distinct from address/transaction/mempool and mining-pool APIs and from exchange price feeds — this is Bitcoin's aggregate on-chain economics and network activity.",
        "ups
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/bitcoinstats-api
OpenAPI spec: https://www.oanor.com/api/bitcoinstats-api/openapi.json
