Skip to content Skip to sidebar Skip to footer

Is There An Easy Way To Access All Transactions Recorded In A Bitcoin Block With Certain Block Height Using Python?

I would like to retrive all transactions within a block with a certain block height, without running a full node or downloading a few GB of data. Not sticking to Python, tried to u

Solution 1:

You have to use without $ which was only information that $block_height is not part of url but variable which you have to replace,

https://blockchain.info/block-height/100?format=json

import requests

r = requests.get('https://blockchain.info/block-height/100?format=json')
data = r.json()

#print(r.text)
#print(data)
print(data['blocks'][0]['hash'])

Post a Comment for "Is There An Easy Way To Access All Transactions Recorded In A Bitcoin Block With Certain Block Height Using Python?"