0

Blockchain.info provides this functionality in a simple API like so:

https://blockchain.info/rawtx/fc15f762e8dbbdd407534047ef2a9211ca0e79c3625d5fe73cdacade4f9118d6

However, I would prefer to make this query directly against the network blockchain rather than to a third party like blockchain.info.

1

You can use JSON-RPC to achieve this. The only missing information will be the relayed_by field.

To use the JSON-RPC API of your client edit your bitcoin.conf file like this

rpcuser=user 
rpcpassword=password 
rpcport=8332
server=1

Then you can use a library to query the API like JSON-RPC for PHP

You can also do it on a much easier way by using the command line

./bitcoind getblock c15f762e8dbbdd407534047ef2a9211ca0e79c3625d5fe73cdacade4f9118d6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.