# Bitcoin Mining Pool Distribution API
> Who actually mines Bitcoin's blocks, served from the public blockchain.com pools feed. The distribution endpoint ranks the mining pools by the blocks they found over a window (24 hours to 10 days), with each pool's share of blocks and its estimated share of the network hash rate (in EH/s). The centralization endpoint turns that into mining-decentralisation metrics — the top pool's share, the top-3 and top-5 share, the Nakamoto coefficient (the fewest pools that together control more than half of the attributed blocks, a headline measure of how centralised mining is), the Herfindahl concentration index, and the share of blocks not attributed to a known pool. The pool endpoint looks up a single pool's blocks, share, rank and estimated hash rate. This is the mining-pool and hash-rate-distribution / centralisation data-cut — distinct from the mempool-snapshot, the aggregate on-chain-metrics and the price-feed APIs in the catalogue. Estimated per-pool hash rate = block share times network hash rate. Live, no key on the upstream, nothing stored.

## 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/miningpools-api/..."
```

## Pricing
- **Free** (Free) — 29,000 calls/Mo, 5 req/s
- **Starter** ($7/Mo) — 330,000 calls/Mo, 15 req/s
- **Pro** ($20/Mo) — 1,390,000 calls/Mo, 40 req/s
- **Scale** ($46/Mo) — 4,950,000 calls/Mo, 100 req/s

## Endpoints

### Mining

#### `GET /v1/centralization` — Decentralisation metrics incl. Nakamoto coefficient

**Parameters:**
- `timespan` (query, optional, string) — Window Example: `4days`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/miningpools-api/v1/centralization?timespan=4days"
```

**Response:**
```json
{
    "data": {
        "note": "Nakamoto coefficient = fewest known pools controlling >50% of attributed blocks; lower means more centralised.",
        "source": "blockchain.com",
        "timespan": "4days",
        "top_pool": {
            "pool": "AntPool",
            "share_pct": 44.49
        },
        "total_blocks": 515,
        "top3_share_pct": 88.57,
        "top5_share_pct": 95.92,
        "herfindahl_index": 3020.2,
        "known_pool_count": 7,
        "unknown_share_pct": 52.43,
        "nakamoto_coefficient": 2
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:30.674Z",
        "request_id": "55f62002-a793-4174-a142-0bc42a212928"
    },
    "status": "ok",
    "message": "Centralization retrieved successfully",
    "success": true
}
```

#### `GET /v1/distribution` — Pools ranked by blocks with share & hash rate

**Parameters:**
- `timespan` (query, optional, string) — 24hours, 3days, 4days, 5days, 7days, 10days Example: `4days`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/miningpools-api/v1/distribution?timespan=4days"
```

**Response:**
```json
{
    "data": {
        "pools": [
            {
                "pool": "Unknown",
                "blocks": 270,
                "share_pct": 52.43,
                "attributed": false,
                "estimated_hashrate_eh": 434.57
            },
            {
                "pool": "AntPool",
                "blocks": 109,
                "share_pct": 21.17,
                "attributed": true,
                "estimated_hashrate_eh": 175.44
            },
            {
                "pool": "F2Pool",
                "blocks": 64,
                "share_pct": 12.43,
                "attributed": true,
                "estimated_hashrate_eh": 103.01
            },
            {
                "pool": "ViaBTC",
                "blocks": 44,
                "share_pct": 8.54,
                "attributed": true,
                "estimated_hashrate_eh": 70.82
            },
            {
                "pool": "Braiins Pool",
                "blocks": 10,
                "share_pct": 1.94,
                "attributed": true,
                "estimated_hashrate_eh": 16.1
            },
            {
                "pool": "SBI Crypto",
                "blocks": 8,
                "share_pct": 1.55,
                "attributed": true,
                "estimated_hashrate_eh": 12.88
            },
            {
                "pool": "Ultimus",
                "blocks": 6,
                "share_pct": 1.17,
                "attributed": true,
                "estimated_hash
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/pool` — A single pool's blocks, share and rank

**Parameters:**
- `pool` (query, required, string) — Pool name Example: `AntPool`
- `timespan` (query, optional, string) — Window Example: `4days`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/miningpools-api/v1/pool?pool=AntPool&timespan=4days"
```

**Response:**
```json
{
    "data": {
        "pool": "AntPool",
        "rank": 2,
        "blocks": 109,
        "source": "blockchain.com",
        "timespan": "4days",
        "share_pct": 21.17,
        "total_blocks": 515,
        "estimated_hashrate_eh": 175.44
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:30.870Z",
        "request_id": "534366a8-5e37-4e69-acec-bd96d207959b"
    },
    "status": "ok",
    "message": "Pool retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "note": "timespan is 24hours, 3days, 4days (default), 5days, 7days or 10days. 'Unknown' is blocks not attributed to a named pool; centralisation metrics are computed over known pools and report the unknown share separately. Estimated per-pool hash rate = block share x network hash rate (EH/s).",
        "source": "blockchain.com (api.blockchain.info/pools + /q/hashrate, live)",
        "service": "miningpools-api",
        "top_pool": "AntPool",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/pool": "A single pool's blocks, share and rank (pool=AntPool).",
            "GET /v1/distribution": "Pools ranked by blocks with share & estimated hash rate (timespan=4days).",
            "GET /v1/centralization": "Mining-decentralisation metrics incl. Nakamoto coefficient & HHI (timespan=4days)."
        },
        "description": "Who actually mines Bitcoin's blocks, from blockchain.com. distribution ranks mining pools by blocks found over a window with each pool's block share and estimated hash-rate share; centralization turns that into decentralisation metrics — top pool / top-3 / top-5 share, the Nakamoto coefficient (fewest pools controlling >50% of blocks), the Herfindahl concentration index, and the unattributed share; pool looks up a single pool's blocks, share and rank. Live, no key, nothing stored. The mining-pool / hash-rate-distribution and centralisation data-cut — distinct from the mempool-snapshot, on-
…(truncated, see openapi.json for full schema)
```


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