# Bitcoin Mempool Stats

> Bitcoin Mempool Stats 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-10-24).

Fetches real-time Bitcoin mempool statistics including transaction count, fee rates, mining difficulty, and halving countdown from mempool.space

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/bitcoin-mempool-stats?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bitcoin-mempool-stats-18822989
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OH7AHhB_ftqiytwIbSclP

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-mempool-stats-18822989
```

Example prompt: What are the current Bitcoin mempool stats — how many unconfirmed transactions are there, what are the current fee rates in sat/vByte, and how many blocks until the next halving?

## When to prefer this

Use this endpoint when you need a single unified snapshot of Bitcoin network health — combining mempool backlog, fee rates, difficulty adjustment progress, and halving countdown in one call. Prefer this over raw mempool.space API access when you need pay-per-call billing with no signup, or when integrating into an x402-compatible agent workflow. Best for real-time fee estimation, network monitoring dashboards, or halving event tracking.

## Known failure modes

- Upstream mempool.space API unavailable — stale or missing data returned
- Network timeout from the Cloudflare Worker proxy
- Occasional brief staleness if mempool.space data feed is delayed
- Payment failure results in no charge and no data returned

## How this service works

Bitcoin mempool congestion from mempool.space: unconfirmed transaction count and size, recommended fee rates in sat/vB, difficulty-adjustment progress and estimated retarget date, and blocks until the next halving (every 210,000 blocks). Current snapshot only; no history.

## Output

Returns a JSON object with: current mempool transaction count, total mempool vsize in vBytes, total fees in satoshis, fee rates for fastest/half-hour/hour/economy/minimum in sat/vByte, current block tip height, mining difficulty progress percentage, remaining blocks to retarget, expected difficulty change percentage, estimated retarget date, next halving block height, and blocks until the next halving. Also includes the data source URL and timestamp of the check.

## 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": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": "https://mempool.space/api/mempool",
  "mempool": {
   "txCount": 49426,
   "vsizeVb": 25287373,
   "totalFeesSats": 5068478
  },
  "checkedAt": "2026-10-23T09:35:55.649Z",
  "tipHeight": 972749,
  "difficulty": {
   "progressPct": 51.44,
   "remainingBlocks": 979,
   "expectedChangePct": 4.87,
   "estimatedRetargetDate": "2026-10-29T21:20:41.027Z"
  },
  "feeRatesSatPerVb": {
   "hour": 1,
   "economy": 1,
   "fastest": 2,
   "minimum": 1,
   "halfHour": 1
  },
  "nextHalvingHeight": 1050000,
  "blocksUntilHalving": 77251
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bitcoin-mempool-stats-18822989/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)
