Does anyone know how of a mempool.space alternative, or a Python script, to calculate the fee ranges in the next few blocks (highlighted in red in this screenshot)?
A simple python script using requests library and mempool.space data:
import requests
r = requests.get('https://mempool.space/api/v1/fees/recommended')
r.status_code
# 200
r.json()
# {'fastestFee': 17, 'halfHourFee': 10, 'hourFee': 1, 'minimumFee': 1}
r.json()['fastestFee']
#17
fastestFee next block
halfHourFee 3 blocks
hourFee 6 blocks
Edit: There's mempool.observer as well as jochen-hoenicke.de/queue but they are both visual representation.
I also made one
visual representation , few years ago.