getBlockTime

Returns the estimated production time of a block.

📘

Supported on Solana (mainnet) only.

Parameters

  • <u64> - block, identified by Slot

Returns

  • <i64> - estimated production time, as Unix timestamp (seconds since the Unix epoch)
  • <null> - timestamp is not available for this block

API Endpoint

The format of an Solana API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/solana/

Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/solana/

Example

Request

curl https://open-platform.nodereal.io/{{apiKey}}/solana/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1, "method":"getBlockTime","params":[5]}'

Result

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