Playing around with python and doing mempool data analysis on your own node. Now am I tripping or is that an avg fee of 2btc ?? I gotta be reading this wrong.

import requests

import pandas as pd

import matplotlib.pyplot as plt

# Get the latest address from the Mempool.Space API

url = "http://yournode.local:3006/api/v1/mining/blocks/fees/1w"

response = requests.get(url)

data = response.json()

avg_fee = []

for i in range(len(data)):

avg_fee.append(data[i]['avgFees'])

df = pd.DataFrame(data)

plt.plot(df["avgHeight"], df["avgFees"]*1e-8)

plt.xlabel('Block')

plt.ylabel('Avg Fees [BTC]')

plt.show()

Reply to this note

Please Login to reply.

Discussion

No replies yet.