# Satoshi API Next-Block Forecast

> Satoshi API Next-Block Forecast is a paid API for AI agents from cdp.bitcoinsapi.com, paid per call via x402, $0.01/call, status down (last checked 2026-10-13).

Returns real-time Bitcoin mempool data for the next expected block, including fee rates, transaction count, and top transactions by fee rate.

## Facts

- Endpoint: GET https://cdp.bitcoinsapi.com/api/v1/mining/nextblock?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cdp-bitcoinsapi-com-ad3ec7e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RaAcCFpIqaQ2adhUc-jTv

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 cdp-bitcoinsapi-com-ad3ec7e4
```

Example prompt: What does the next Bitcoin block look like right now — how many transactions are queued, what's the median fee rate, and which transactions are paying the highest fees?

## When to prefer this

Use this endpoint when an AI agent or wallet needs to decide whether to broadcast a Bitcoin transaction immediately, estimate the fee needed for next-block inclusion, or monitor real-time mempool pressure. It is specifically optimized for next-block forecasting with human-agent-friendly output, unlike raw mempool RPC calls. Prefer this over the general fee landscape endpoint when you specifically need next-block data and top transaction context.

## Known failure modes

- Node syncing: if syncing=true in meta, data may be stale or incomplete
- Null fee fields: max_fee_rate, min_fee_rate, total_fees_btc, median_fee_rate may return null if insufficient mempool data
- Payment required: HTTP 402 if x402 payment header is missing or insufficient (requires $0.01 USDC per call)
- Empty top_5 array: returned if mempool is near-empty
- Network errors or node unavailability may return 5xx errors

## How this service works

Satoshi API next-block forecast: Bitcoin block fee pressure and inclusion timing for agents deciding whether to broadcast now.

## Output

Returns a JSON object with the forecasted next block's height, transaction count, median/max/min fee rates (sat/vByte), total fees in BTC, total weight, and an array of the top 5 transactions by fee rate (txid, fee_rate, fee_sats). Also includes metadata such as chain, cache age, node height, sync status, and request timestamp.

## Example request

```json
{
 "input": {
  "queryParams": {}
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "input": {
  "type": "http",
  "method": "GET",
  "resource": "https://cdp.bitcoinsapi.com/api/v1/mining/nextblock",
  "queryParams": {}
 },
 "output": {
  "type": "json",
  "schema": {
   "type": "object",
   "required": [
    "height",
    "tx_count",
    "median_fee_rate"
   ],
   "properties": {
    "top_5": {
     "type": "array"
    },
    "height": {
     "type": "integer"
    },
    "tx_count": {
     "type": "integer"
    },
    "max_fee_rate": {
     "type": "number"
    },
    "min_fee_rate": {
     "type": "number"
    },
    "total_fees_btc": {
     "type": "number"
    },
    "median_fee_rate": {
     "type": "number"
    }
   }
  },
  "example": {
   "top_5": [
    {
     "txid": "example-txid",
     "fee_rate": 122
    }
   ],
   "height": 840000,
   "tx_count": 2800,
   "max_fee_rate": 122,
   "min_fee_rate": 5.1,
   "total_fees_btc": 0.36,
   "median_fee_rate": 14.2
  },
  "mimeType": "application/json"
 },
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "mimeType",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "schema": {
     "type": "object"
    },
    "example": {
     "type": "object"
    },
    "mimeType": {
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data",
  "meta"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "top_5",
    "height",
    "tx_count",
    "max_fee_rate",
    "min_fee_rate",
    "total_weight",
    "total_fees_btc",
    "median_fee_rate"
   ],
   "properties": {
    "top_5": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "txid",
       "fee_rate",
       "fee_sats"
      ],
      "properties": {
       "txid": {
        "type": "string"
       },
       "fee_rate": {
        "type": "number"
       },
       "fee_sats": {
        "type": "number"
       }
      }
     }
    },
    "height": {
     "type": "number"
    },
    "tx_count": {
     "type": "number"
    },
    "max_fee_rate": {
     "type": "null"
    },
    "min_fee_rate": {
     "type": "null"
    },
    "total_weight": {
     "type": "number"
    },
    "total_fees_btc": {
     "type": "null"
    },
    "median_fee_rate": {
     "type": "null"
    }
   }
  },
  "meta": {
   "type": "object",
   "required": [
    "chain",
    "cached",
    "syncing",
    "timestamp",
    "max_blocks",
    "request_id",
    "node_height",
    "cache_age_seconds"
   ],
   "properties": {
    "chain": {
     "type": "string"
    },
    "cached": {
     "type": "boolean"
    },
    "syncing": {
     "type": "boolean"
    },
    "timestamp": {
     "type": "string"
    },
    "max_blocks": {
     "type": "null"
    },
    "request_id": {
     "type": "null"
    },
    "node_height": {
     "type": "number"
    },
    "cache_age_seconds": {
     "type": "number"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cdp-bitcoinsapi-com-ad3ec7e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cdp.bitcoinsapi.com](https://www.zero.xyz/host/cdp.bitcoinsapi.com/llms.txt)
