# Bitcoin Block Summary by Height or Hash

> Bitcoin Block Summary by Height or Hash is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-21).

Returns detailed Bitcoin block metadata (size, weight, tx count, fees, subsidy, reward, fee range, median fee rate, mining pool, coinbase message) for a given block height or hash via mempool.space.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/btc-block?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitcoin-block-summary-by-height-or-hash-301a2bd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_luvcKEXjGYbMfYfoKuzXe

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 bitcoin-block-summary-by-height-or-hash-301a2bd7
```

Example prompt: Can you pull up the full block summary for Bitcoin block 840000 — I want to know the mining pool, total fees, median fee rate, transaction count, and the coinbase message?

## When to prefer this

Use this endpoint when you need a comprehensive single-block summary from Bitcoin's chain — especially when you need mining pool attribution, coinbase message decoding, or fee statistics for a specific block. It is more detailed than generic block explorers and surfaces sat/vB fee range and median in one call. Prefer this over raw mempool.space API calls when you need a paid, structured, agent-friendly response with combined fields.

## Known failure modes

- Block not found: invalid or non-existent height/hash returns an error
- Missing required parameter: neither height nor hash provided results in a 400-level error
- Invalid hash format: non-64-character or non-hex string rejected
- mempool.space upstream unavailability causes timeout or 502 error
- Future block heights not yet mined return not-found errors

## How this service works

Detailed Bitcoin block summary by height or hash from mempool.space: size, weight, tx count, total fees, subsidy, reward, fee range, median fee rate sat/vB, mining pool, and coinbase message.

## Output

Returns a structured summary of a single Bitcoin block including: block size (bytes), weight (WU), transaction count, total fees (sats), block subsidy (sats), miner reward (sats), minimum and maximum fee rates (sat/vB), median fee rate (sat/vB), mining pool name, and the decoded coinbase message string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "hash": {
       "type": "string",
       "description": "64-character hexadecimal block hash"
      },
      "height": {
       "type": "string",
       "description": "Block height number (e.g. '840000')"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitcoin-block-summary-by-height-or-hash-301a2bd7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
