I'm trying to fetch specific block transactions, is it possible to do so using bitcoin-core?
for example block number:
517716 can I get hex transactions or even just the txid's of that block?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
Yes. Use the
getblock commands. You would do:
and this will return you the block hash for block 517716. Then you can do
getblock <hash> 2
<hash> is the hash from
getblockhash. This will give you the full block details with the full details of all of the transactions in the block. If you just want txids, change the
2 to a
Note that this only works if you are not in pruned mode. If you are pruning, there is no guarantee that you still have the block.