gRPCGetLatestBlockhash

solana-mainnet.nodit.io:443 geyser.Geyser/GetLatestBlockhashunary

Returns the latest blockhash at the given commitment level, together with the last block height at which the blockhash is valid, for use as a transaction's recent blockhash.

Request Body
commitmentstring (enum)

Commitment level for the query. One of PROCESSED, CONFIRMED, or FINALIZED. Defaults to PROCESSED when omitted.

Responses
slotstring (uint64)

Slot number of the block the blockhash was taken from.

blockhashstring

Latest blockhash (Base58).

last_valid_block_heightstring (uint64)

Last block height at which a transaction using this blockhash is valid. Equals the current block height plus 300.

X-API-KEY
RequestCU10
grpcurl
grpcurl \
  -import-path . -proto geyser.proto \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d '{
    "commitment": "CONFIRMED"
  }' \
  solana-mainnet.nodit.io:443 geyser.Geyser/GetLatestBlockhash
Response
Example · 200
{
  "slot": "372215930",
  "blockhash": "8ZPbuZ5Y3iuhyBuUNKFxa8bW8Z6nb9gpwNFWmMjXZVsZ",
  "last_valid_block_height": "350391418"
}