# getBlockHeight
Solana API method that returns the current block height of the node.
Parameters:
<object>
— (optional) the configuration object containing the following fields:commitment: <string>
— (optional) the commitment.minContextSlot: <number>
— (optional) the minimum slot that the request can be evaluated at.
Returns:
u64
— the current block height.
Example:
- Solana web3.js
- Solana.py
- cURL
import { Connection } from "@solana/web3.js";
const nodeUrl = "CHAINSTACK_NODE_URL"
const connect = new Connection(nodeUrl);
(async () => {
console.log(await connect.getBlockHeight());
})();