# getBlockTime

> Returns the estimated production time of a confirmed block.

Source: https://docs.constant-k.com/rpc/http/getblocktime/

`getBlockTime` returns the estimated Unix timestamp a slot's block was produced at, derived from validators' vote timestamps. It is accurate to within a few seconds, not milliseconds.

It is a cheaper alternative to fetching the full block when only the timestamp is needed.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Blocks
- Availability: All plans
- Rate limits: Free 2/s · Operator 5/s · Blade Runner 50/s · Nexus 100/s

## Parameters

`params` is a positional JSON array, in this order:

- `slot` (integer, required): Slot number to get the estimated production time for.

## Result

- `result` (integer | null, optional): Estimated production time as Unix seconds, or null if unavailable for that slot.

## Example: Get a block's estimated production time

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlockTime",
    "params": [447946420]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": 1789696069,
  "id": 1
}
```

## Notes

- A `null` result means the node lacks timestamp data for that slot; it does not mean the slot itself does not exist.
- constant-k retains a rolling window of ledger history; a slot older than that window returns an error rather than a null `blockTime`, and `minimumLedgerSlot` reports how far back that window reaches.

