← Guides

How to get an alert when your bitcoin miner stops being profitable

Short answer: To get an alert when your bitcoin miner stops being profitable, compare hashprice from free mempool.space and CoinGecko data with your power cost on a schedule, and alert when your margin drops below a threshold. You can set this up yourself with the steps below, or use our ready-made Miner Profitability Monitor recipe.

What you need

Free data sources

The math

daily_btc_per_TH = (totalReward_sats / 1e8) / (currentHashrate_Hs / 1e12)
hashprice_usd_TH = daily_btc_per_TH × BTC_price
revenue_day      = hashprice_usd_TH × your_TH × (1 − pool_fee)
power_day        = (your_watts / 1000) × 24 × your_$per_kWh
profit_day       = revenue_day − power_day
margin           = profit_day / revenue_day
break_even_$kWh  = revenue_day / ((your_watts / 1000) × 24)

This is an estimate: luck, pool payout method (FPPS vs PPLNS) and fee spikes all move real payouts.

Step by step

  1. Gather your numbers. Total fleet hashrate (TH/s), total power draw at the wall (watts), your all-in power cost ($/kWh) and your pool fee.
  2. Pull free network data. Block rewards and hashrate from mempool.space and the BTC price from CoinGecko (free, no key needed for light use).
  3. Work out hashprice and margin. Hashprice is USD earned per TH/s per day. Multiply by your TH/s and subtract pool fee and power cost to get daily profit and margin.
  4. Set an alert threshold. Alert when margin falls below a threshold (the template default is 10%) or goes negative, and when the next difficulty adjustment would push you under it.
  5. Schedule the check. Run it every 4 hours with a daily summary, in Grok Bot, ChatGPT/Claude, or self-hosted n8n.

Which alerts are worth sending

Keep it advice-only: the alert tells you what changed; you decide what to do with your miners.

Skip the setup

The Miner Profitability Monitor (Template 01) does all of this, with a Grok Bot routine, ChatGPT/Claude instructions and an n8n workflow outline. It's part of the Pro Pack. For a free daily view of price, fees, hashrate and the next difficulty adjustment, try the Bitcoin Price & News Daily Brief.