how to achieve transaction info of all the blocks

0

I use https://chain.api.btc.com/v3/block/date/20151215 to achieve list of blocks and also use https://chain.api.btc.com/v3/tx/0eab89a271380b09987bcee5258fca91f28df4dadcedf892658b9bc261050d96?verbose=3 to get transaction info for a single transaction. Now I have a question. To access transaction info of all blocks what should I do? when I copy the hash of any block from the list of the first link in the second link, it shows error.

Mahsa Mirzaee

Posted 2018-08-15T17:04:45.133

Reputation: 1

Answers

1

That's because you're pasting a block hash into a field that expects a transaction hash.

It looks like btc.com doesn't support listing all transactions for a given block, it will only give a tx count: https://btc.com/api-doc#Block.

Blockchain.info does, however at the api endpoint:

https://blockchain.info/rawblock/$block_hash

So, you can copy the hash of any block from the list of the first link in your answer to the $block_hash field in https://blockchain.info/rawblock/$block_hash.

JBaczuk

Posted 2018-08-15T17:04:45.133

Reputation: 6 172