get Block Height
POSTBlocksAll plans
Returns the current block height the node has processed.
Try itSends a real request from your browser to the selected region.
getBlockHeight returns the number of confirmed blocks beneath the current bank. Unlike slot number, block height does not count skipped slots, so it advances by one for every produced block.
A blockhash's lastValidBlockHeight, compared against this value, indicates whether that blockhash, and any transaction built on it, is still usable.
Plans & rate limitsAll plans
Free5/s
Operator50/s
Blade Runner200/s
Nexus500/s
Parameters
params is a JSON array, with values in this order: config.
1configobject
Optional configuration.
Show propertiesProperties
commitmentstringdefault: "finalized"
Bank state to read the block height from.
Allowed values:
finalizedconfirmedprocessedminContextSlotinteger
Minimum slot the node must have processed before answering.
Result
resultinteger
Current block height. A plain integer, not wrapped in a context/value envelope.
Notes
- Block height and slot number diverge over time because skipped slots do not advance block height, so the two are not interchangeable.
- Once
getBlockHeightexceeds a transaction'slastValidBlockHeight(fromgetLatestBlockhash), that blockhash can no longer be used.