⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
sol
Solana (SOL)

Method: POST getBlockTime

dropdown

# getBlockTime example for Solana (SOL)

POST getBlockTime

Returns the estimated production time of a block.

Each validator reports their UTC time to the ledger on a regular interval by intermittently adding a timestamp to a Vote for a particular block. A requested block's time is calculated from the stake-weighted mean of the Vote timestamps in a set of recent blocks recorded on the ledger.

Parameters

block - u64

block, identified by Slot.

Request

curl --location --request POST 'https://sol.getblock.io/mainnet' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "getBlockTime",
"params": [122791192],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": 1646011316
}