# Diamond Bitcoin Block Stats

> Diamond Bitcoin Block Stats is a paid API for AI agents from diamond.btc-intel.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-18).

Fetches detailed statistics for a specific Bitcoin block by height or hash, including miner, transaction count, fees, and fee-rate percentiles.

## Facts

- Endpoint: GET https://diamond.btc-intel.workers.dev/api/x402/block_stats?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/diamond-bitcoin-block-stats-b28b35b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z7uRgTEeZkVYa2ft-vjmi

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 diamond-bitcoin-block-stats-b28b35b9
```

Example prompt: Pull up the block stats for Bitcoin block 974000 — I want to know which mining pool mined it, how many transactions it had, the total fees collected, and the fee-rate percentiles.

## When to prefer this

Use this endpoint when you need granular per-block statistics — miner attribution, fee distributions, and transaction counts — for a specific Bitcoin block identified by height or hash. It is preferable to general Bitcoin network-status endpoints when the query is block-specific rather than network-wide, and preferable to mempool endpoints when the block has already been confirmed.

## Known failure modes

- Invalid or non-existent block height returns an error
- Malformed block hash (not 64 hex characters) returns a validation error
- Block not yet mined (future height) returns not found
- Rate limiting or payment failure returns 402 Payment Required
- Network or node sync lag may return stale data for very recent blocks

## How this service works

Statistics for one recent Bitcoin block (this pruned node keeps roughly the last 10,000) by height or hash: tx count, total fees, fee-rate percentiles, size, weight, subsidy, inputs and outputs, SegWit share, and the miner (coinbase tag and pool).

## Output

Returns a JSON object with the block height, UTC timestamp, miner pool name and coinbase tag, total transaction count, total fees in BTC, and an array of fee-rate percentiles (10th, 25th, 50th, 75th, 90th) in sat/vB for the specified block.

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "block_id"
     ],
     "properties": {
      "block_id": {
       "type": "string",
       "maxLength": 64,
       "description": "Block height (for example 974000) or block hash (64 hex characters)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-11-07T18:00:00Z",
  "miner": {
   "pool": "Foundry USA",
   "coinbase_tag": "Foundry USA Pool #dropgold"
  },
  "height": 974000,
  "product": "block_stats",
  "tx_count": 3600,
  "total_fees_btc": 0.025,
  "fee_rate_sat_vb": {
   "percentiles_10_25_50_75_90": [
    1,
    1.5,
    2,
    3,
    6
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/diamond-bitcoin-block-stats-b28b35b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from diamond.btc-intel.workers.dev](https://www.zero.xyz/host/diamond.btc-intel.workers.dev/llms.txt)
