bitcoind.app
CommandsGuidesContact ↗
Home/Blockchain/getbestblockhash
Blockchain

getbestblockhash

Returns the hash of the best (tip) block in the most-work fully-validated chain.

Returns

stringThe block hash, hex-encoded

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"getbestblockhash","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

"00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72f8804c6"
Next →
getblock

More Blockchain Commands

getblockgetblockchaininfogetblockcountgetblockfiltergetblockhashgetblockheader

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗