getBlockTime
Returns the estimated production time of a block.
Parameters
Slot <u64>
- block number, identified by Slot
Result
<i64>
- estimated production time, as Unix timestamp (in milliseconds since the Unix epoch)
Code sample
curl "https://testnet.atlas.xyz/?apikey=$ATLAS_API_KEY" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"method": "getBlockTime",
"params": [
12344230
]
}
'
Response
When a block time is available:
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"result": 1725027523402
}
When a block time is not available:
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"result": null
}