bitcoind.app
CommandsGuidesContact ↗
Home/Blockchain/getblockcount
Blockchain

getblockcount

Returns the height of the most-work fully-validated chain. The genesis block has height 0.

Returns

numberThe current block count

Code Examples

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

Example Response

840000
← Previous
getblockchaininfo
Next →
getblockfilter

More Blockchain Commands

getbestblockhashgetblockgetblockchaininfogetblockfiltergetblockhashgetblockheader

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗