Returns the estimated production time for a block.
Source
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.
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getBlockTime",> "params": [> 377268280> ]> }> '
params
u64required
Slot number to query, as a u64 integer.
result
available
unknown time
unavailable
Response
{"jsonrpc": "2.0","result": 1574721591,"id": 1}
i64
Estimated production time, as Unix timestamp (seconds since the Unix epoch)
Is this page helpful?