Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mempool/mempool/llms.txt
Use this file to discover all available pages before exploring further.
Get Difficulty Adjustment
Retrieve information about the current difficulty adjustment period, including estimated retarget date and difficulty change.Progress through the current difficulty epoch as a percentage (0-100)
Estimated difficulty change percentage at the next retarget. Positive values indicate an increase, negative values indicate a decrease. Range: -75 to 300.
Estimated Unix timestamp (in milliseconds) of the next difficulty retarget
Number of blocks remaining until the next difficulty adjustment
Estimated time remaining until the next retarget in milliseconds
Difficulty change percentage from the previous retarget. Range: -75 to 300.
Unix timestamp (in milliseconds) of the previous difficulty retarget
Block height at which the next difficulty adjustment will occur
Average time between blocks in the current epoch in milliseconds
Adjusted average block time considering the hashrate implied over the last 504 blocks, in milliseconds
Time offset for testnet networks. On testnet, difficulty resets to 1 after 20 minutes of no blocks. This field shows the time since the last block (capped at 20 minutes) in milliseconds. Always 0 on mainnet.
Expected number of blocks that should have been mined in the elapsed time based on the 10-minute target
Response Example
Understanding Difficulty Adjustment
Bitcoin’s difficulty adjusts every 2016 blocks (approximately every 2 weeks) to maintain an average block time of 10 minutes. The adjustment is calculated based on how long it actually took to mine the previous 2016 blocks compared to the target time.- If blocks were mined faster than 10 minutes on average, difficulty increases (positive
difficultyChange) - If blocks were mined slower than 10 minutes on average, difficulty decreases (negative
difficultyChange) - Maximum increase: +300% (4x difficulty)
- Maximum decrease: -75% (1/4 difficulty)
Use Cases
- Mining Profitability: Estimate future mining difficulty to calculate expected returns
- Network Monitoring: Track Bitcoin network hashrate changes through difficulty adjustments
- Fee Estimation: Difficulty increases often correlate with increased network activity
- Educational Tools: Display real-time information about Bitcoin’s self-adjusting security mechanism
Notes
The
adjustedTimeAvg provides a more accurate estimate for the first 504 blocks of an epoch by using a sliding window over the last 504 blocks that includes data from the previous epoch.