Can anyone plz point out a way to derive the BlockHash from TxHash using API ?

Lets assume I am studying the following...



I have "block_height":277586

Now, how do I find out the block_hash of this ?

1 Answer 1


Although I don't fully understand your question, I can tell you that you can get the hash of a block at height Happy using the getblockhash api call:

getblockhash 277586

Will result in the block hash for the block on the main chain at height 277586.

Block Explorer.com provides an online api for this api call: http://blockexplorer.com/q/getblockhash

  • As per your suggestion I tried the following... blockexplorer.com/q/getblockhash/277586 But it is throwing the following Error... ERROR: unknown (Most likely my bitcoind stopped working or this page is too large/complex.) Hence, I was thinking if there could be some API call on blockchain.info rather than bloclexplorer.com, as it seems the former is more stable than the latter. Commented Jan 4, 2014 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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