# Bitcoin Mempool Analytics — Whale Tx + Fees + Block Stats (`gochujang/bitcoin-mempool-analytics`) Actor

Live Bitcoin mempool snapshot: whale transfers (≥X BTC), pending tx count, fee bands (next-block / 30min / 1hr), recent block stats. mempool.space data. Time your BTC sends, catch whale moves. PPE $0.002/snapshot.

- **URL**: https://apify.com/gochujang/bitcoin-mempool-analytics.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 snapshot captureds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Bitcoin Mempool Analytics — BTC Transaction Fees & Mempool Congestion Tracker

> Real-time **Bitcoin mempool analytics** for traders, developers, and on-chain researchers: track **BTC transaction fees** by speed tier, measure **mempool congestion** levels, monitor unconfirmed transactions, whale activity, recent blocks, hash rate, and difficulty adjustment — all in a single structured API call. Powered by mempool.space via Apify's cloud execution. No API key required.

**Stop overpaying on Bitcoin transaction fees.** Whether you are a miner, exchange operator, wallet developer, or DeFi power user, knowing the exact fee environment before you broadcast saves real money. This Actor runs on **Apify's always-on infrastructure** — schedule it every minute, pipe results to your bot, and never guess at fees again.

***

### What does Bitcoin Mempool Analytics do?

The **Bitcoin mempool analytics** Actor captures a complete snapshot of the Bitcoin network state in a single run: recommended fees at four speed tiers (sat/vB), a composite **mempool pressure index** (0–100), congestion labels, whale transaction detection, miner revenue breakdown, recent block stats, current hash rate, and the next difficulty adjustment estimate. **Apify's dataset storage** saves every snapshot automatically — chain them together over time to build a fee history database without managing any infrastructure yourself.

Every run also computes an **optimal fee strategy** (`normal`, `rbf_friendly`, or `cpfp_needed`) and quantifies exactly how many satoshis you save by using the medium fee tier instead of the fastest — actionable intelligence delivered as clean JSON your application can consume directly.

***

### Why use Bitcoin Mempool Analytics?

- **Fee optimization for wallets and exchanges.** The `fee_savings_vs_high` field tells you the exact satoshi savings for a 250-byte transaction at medium vs. fastest fee — make smarter broadcast decisions programmatically.
- **Trading bot integration.** High mempool pressure often precedes sharp BTC price moves as large OTC flows hit the chain. Set `alertFeeSatVb` to trigger a Telegram notification the moment fees spike above your threshold.
- **Whale transaction surveillance.** The `whale_tx_dominance_pct` field measures what fraction of pending mempool value belongs to large transactions (configurable BTC threshold). Rising whale dominance signals pending institutional flow.
- **Mining analytics and MEV research.** `miner_revenue_breakdown_btc` shows the subsidy-vs-fees split per block — essential for tracking miner economics, especially around halving events.
- **Difficulty adjustment forecasting.** `next_difficulty_change_pct` and `next_difficulty_eta_seconds` let you anticipate hash rate regime changes before they hit price models.

***

### How to use Bitcoin Mempool Analytics

1. Open the Actor on Apify Store and click **Try for free**.
2. Leave defaults for an instant full snapshot — fees, congestion, recent blocks, whale txs, difficulty.
3. Click **Start**. Results appear in the **Dataset** tab within 15–30 seconds.
4. Copy the dataset API URL to integrate into your application, spreadsheet, or Telegram bot.
5. To monitor continuously, use Apify's **Schedule** feature — set it to run every 1, 5, or 15 minutes and get a permanent dataset archive of every snapshot.

***

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `includeWhaleTransactions` | boolean | `true` | Scan recent mempool for large-BTC transactions |
| `minWhaleBtc` | number | `10` | Minimum BTC size to flag as whale transaction |
| `blocksLookback` | integer | `10` | Number of recent blocks to fetch stats for |
| `alertFeeSatVb` | integer | `0` | Send Telegram alert when fastest fee reaches this level (sat/vB). 0 = disabled |
| `telegramBotToken` | string (secret) | — | Telegram bot token for fee spike alerts |
| `telegramChatId` | string | — | Telegram chat ID for alerts |

**Example — Low-fee window alert:**

```json
{
  "includeWhaleTransactions": false,
  "alertFeeSatVb": 5,
  "telegramBotToken": "<your-token>",
  "telegramChatId": "<your-chat-id>"
}
```

**Example — Whale-only scan with tight threshold:**

```json
{
  "includeWhaleTransactions": true,
  "minWhaleBtc": 50,
  "blocksLookback": 1
}
```

***

### Output

The Actor produces two record types in the same dataset run:

**Mempool snapshot** (`_type: "mempool_snapshot"`):

```json
[
  {
    "_type": "mempool_snapshot",
    "timestamp": "2026-09-01T01:35:00+00:00",
    "fastest_fee_sat_vb": 18,
    "half_hour_fee_sat_vb": 12,
    "hour_fee_sat_vb": 8,
    "economy_fee_sat_vb": 3,
    "minimum_fee_sat_vb": 1,
    "mempool_tx_count": 75069,
    "mempool_vsize_bytes": 28560123,
    "blocks_to_clear": 28.56,
    "mempool_pressure_index": 42.7,
    "network_congestion_level": "moderate",
    "optimal_fee_strategy": "rbf_friendly",
    "fee_savings_vs_high": {
      "savings_sat": 2500,
      "assumed_tx_size_bytes": 250,
      "fee_high_sat_vb": 18,
      "fee_medium_sat_vb": 8
    },
    "blocks_until_confirmation_estimate": 3,
    "whale_tx_dominance_pct": 68.4,
    "mempool_trend_1h": "stable",
    "current_hashrate_ehs": 720.45,
    "next_difficulty_change_pct": 1.85,
    "next_difficulty_eta_seconds": 432000,
    "miner_revenue_breakdown_btc": {
      "block_subsidy_btc": 3.125,
      "fees_btc": 0.00042,
      "fee_pct_of_revenue": 0.0134
    }
  }
]
```

**Whale transaction** (`_type: "whale_tx"`):

```json
[
  {
    "_type": "whale_tx",
    "txid": "f2c9a1b7...",
    "value_btc": 152.4,
    "fee_sat": 4500,
    "vsize_bytes": 250,
    "fee_rate_sat_vb": 18.0,
    "mempool_url": "https://mempool.space/tx/f2c9a1b7..."
  }
]
```

***

### Data fields

| Field | Type | Description |
|-------|------|-------------|
| `fastest_fee_sat_vb` | integer | Next-block fee estimate in satoshis per virtual byte |
| `half_hour_fee_sat_vb` | integer | Fee for ~30-minute confirmation |
| `hour_fee_sat_vb` | integer | Fee for ~1-hour confirmation |
| `economy_fee_sat_vb` | integer | Economy fee (low priority, may take hours) |
| `mempool_pressure_index` | float | Composite congestion score 0–100 |
| `network_congestion_level` | string | `clear`, `light`, `moderate`, `heavy`, or `severe` |
| `optimal_fee_strategy` | string | `normal`, `rbf_friendly`, or `cpfp_needed` |
| `fee_savings_vs_high` | object | Satoshi savings at medium vs. fastest fee for a 250-byte tx |
| `whale_tx_dominance_pct` | float | Percentage of pending mempool value from whale-sized transactions |
| `mempool_trend_1h` | string | `rising`, `falling`, or `stable` over the past hour |
| `next_difficulty_change_pct` | float | Projected percentage change at next difficulty epoch |

***

### Cost estimation

This Actor uses **Pay-Per-Event (PPE)** pricing at **$0.002 per snapshot run** (whale txs in the same run are included at no extra charge).

| Scenario | Runs | Estimated cost |
|----------|------|----------------|
| One-off fee check | 1 run | **$0.002** |
| Hourly monitor (30 days) | 720 runs | **$1.44/month** |
| Every-5-minute monitor (30 days) | 8,640 runs | **$17.28/month** |
| Every-minute monitor (30 days) | 43,200 runs | **$86.40/month** |

***

### FAQ

**Q: What data source does this Actor use?**
All data comes from [mempool.space](https://mempool.space) — the canonical open-source Bitcoin mempool explorer. No API key or authentication is required. At single-actor polling frequency, rate limits are not a concern.

**Q: How accurate is the fee recommendation?**
The fee tiers map directly to mempool.space's own fee estimation endpoint, which is the same data used by major Bitcoin wallets. They are estimates, not guarantees — actual confirmation time depends on miner selection and mempool conditions at broadcast time.

**Q: Can I use this for automated fee bumping (RBF/CPFP)?**
Yes. The `optimal_fee_strategy` field tells you which mechanism is appropriate given current mempool conditions. Your application can consume this field to decide when to broadcast RBF replacements or CPFP child transactions.

> **Disclaimer:** Fee estimates are informational. Network conditions change rapidly — always validate before broadcasting high-value transactions. This is not financial advice.

***

### Live Sample Run

A real run with default settings (2026-06-10):

| Field | Value |
|---|---|
| Dataset (JSON) | `https://api.apify.com/v2/datasets/TjcJ4BcRMyj2fC0a7/items?clean=1&format=json` |
| Dataset (CSV) | `https://api.apify.com/v2/datasets/TjcJ4BcRMyj2fC0a7/items?clean=1&format=csv` |
| Run summary (KVS) | `https://api.apify.com/v2/key-value-stores/jIk21zNWpXKrCSjU7/records/SUMMARY` |
| Run details | `https://api.apify.com/v2/actor-runs/nZRcKf2UliosAcqiS` |

***

### Related Actors

- **[Smart Money Wallet Tracker](https://apify.com/gochujang/smart-money-tracker)** — On-chain whale wallet monitoring across EVM and Solana.
- **[Crypto ETF Flow Tracker](https://apify.com/gochujang/crypto-etf-flow-tracker)** — Institutional BTC ETF inflow/outflow data.
- **[CEX Funding Rate Aggregator](https://apify.com/gochujang/cex-funding-aggregator)** — Perp funding rates across exchanges.

### Feedback

[Leave a review on Apify Store](https://apify.com/gochujang/bitcoin-mempool-analytics#reviews)

**Keywords:** Bitcoin mempool analytics, BTC transaction fees, mempool congestion tracker, bitcoin fee estimator, sat/vB fee tracker, bitcoin network congestion, unconfirmed transactions, mempool monitor, BTC fee API, mempool pressure index, whale transactions bitcoin, hash rate monitor, difficulty adjustment, mempool.space API, RBF CPFP strategy, miner revenue bitcoin, bitcoin mempool data, BTC fees tracker, bitcoin congestion API

# Actor input Schema

## `includeWhaleTransactions` (type: `boolean`):

Scan recent mempool for large transactions (>= minWhaleBtc) and emit them as separate rows.

## `minWhaleBtc` (type: `number`):

Threshold for flagging a transaction as a whale tx (in BTC). Default 10 BTC.

## `blocksLookback` (type: `integer`):

How many recent blocks to fetch stats for.

## `includeFeeHistory24h` (type: `boolean`):

Add a fee\_history\_24h field with per-block median/avg fee rates over the last 24h (~144 blocks).

## `alertFeeSatVb` (type: `integer`):

Alert when fastest fee >= this sat/vB. 0 = disabled.

## `telegramBotToken` (type: `string`):

Telegram bot token for alerts.

## `telegramChatId` (type: `string`):

Chat ID to receive alerts.

## Actor input object example

```json
{
  "includeWhaleTransactions": true,
  "minWhaleBtc": 10,
  "blocksLookback": 10,
  "includeFeeHistory24h": false,
  "alertFeeSatVb": 0,
  "telegramChatId": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/bitcoin-mempool-analytics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/bitcoin-mempool-analytics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call gochujang/bitcoin-mempool-analytics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/bitcoin-mempool-analytics"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/aGLX8p91BVQJBS6XL/builds/jdSz8r5d5kRseg53u/openapi.json
