# Block

?module=block

**`https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api?module=block`**

#### Get block reward by block number <a href="#get-block-reward-by-block-number" id="get-block-reward-by-block-number"></a>

`getblockreward`

Returns the block reward and 'uncle' block rewards when applicable.

**Example:**

Copy

```
https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=block
   &action=getblockreward
   &blockno={blockNumber}
```

Request ParamExample Result

| Parameter   | Description                                                     |
| ----------- | --------------------------------------------------------------- |
| **blockno** | `integer` block number to check block rewards for eg. `2165403` |

#### Get estimated block countdown time by block number <a href="#get-estimated-block-countdown-time-by-block-number" id="get-estimated-block-countdown-time-by-block-number"></a>

`getblockcountdown`

Returns the estimated time remaining, in seconds, until a certain block is included in blockchain.

**Example:**

Copy

```
https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=block
   &action=getblockcountdown
   &blockno={blockNumber}
```

Request ParamExample Result

| Parameter   | Description                                                     |
| ----------- | --------------------------------------------------------------- |
| **blockno** | `integer` block number to check block rewards for eg. `2165403` |

#### Get block number by time stamp <a href="#get-block-number-by-time-stamp" id="get-block-number-by-time-stamp"></a>

`getblocknobytime`

Returns the block number created closest to a provided timestamp.

**Example:**

Copy

```
https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=block
   &action=getblocknobytime
   &timestamp={blockTimestamp}
   &closest={before/after}
```

Request ParamExample Result

| Parameter     | Description                                                          |
| ------------- | -------------------------------------------------------------------- |
| **timestamp** | `integer` representing the Unix timestamp in seconds.                |
| **closest**   | closest block to the provided timestamp, either `before` or `after`. |

{% hint style="info" %}
Note: [How to convert date/time to a Unix timestamp](https://www.unixtimestamp.com/).
{% endhint %}

#### Get the latest block number <a href="#get-the-latest-block-number" id="get-the-latest-block-number"></a>

`eth_block_number`

Mimics Ethereum JSON RPC's eth\_blockNumber.

**Example:**

Copy

```
https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=block
   &action=eth_block_number
```

Request ParamExample Result

| Parameter | Description                                                           |
| --------- | --------------------------------------------------------------------- |
| **id**    | optional nonnegative integer that represents the json rpc request id. |

{% hint style="info" %}
More on [json rpc request id](https://www.jsonrpc.org/specification).
{% endhint %}
