getBlockTime RPC Method

Returns the estimated production time of a block.

Method Information

Provides the estimated production time for a specific block in the blockchain.

Parameters

u64 required
Block number, identified by Slot

Code Sample

curl https://rpc.testnet.soo.network/rpc \
-X POST \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockTime",
  "params": [369624]
}'

Response

{
  "jsonrpc": "2.0",
  "result": 1701234567,
  "id": 1
}

Result Details

The result will be:

  • <i64> - Estimated production time
    • Represented as a Unix timestamp (seconds since the Unix epoch)
    • Provides an approximate time when the block was produced