getLatestBlockhash | Solana

Solana getLatestBlockhash method

The Solana getLatestBlockhash method returns the latest block hash that's usable for a new transaction.

This method provides the latest block hash, which is required for creating a new transaction. It is useful for creating new transactions that are valid for inclusion in the ledger.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

This method does not require any parameters.

Response

  • value — the latest block hash:
    • blockhash — the latest block hash.
    • feeCalculator — the fee calculator:
      • lamportsPerSignature — the cost in lamports per signature to validate a transaction.

Use case

A practical use case for getLatestBlockhash is to create new transactions that are valid for inclusion in the ledger. This can be useful for wallets or other applications that need to create new transactions.

Try the getLatestBlockhash RPC method yourself

Language
Click Try It! to start a request and see the response here!