> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base.org/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getBlockTransactionCountByNumber

> Returns the number of transactions in a block by block number.

Returns the number of transactions in a block matching the given block number.

<Tip>
  **Flashblocks:** Query `https://mainnet.base.org` with `"pending"` to get the count of pre-confirmed transactions in the current Flashblock.
</Tip>

## Parameters

<ParamField body="block" type="string" required>
  Block number in hex, or `"latest"`, `"pending"`, `"safe"`, `"finalized"`, `"earliest"`.
</ParamField>

## Returns

<ResponseField name="result" type="string">
  The number of transactions in the block as a hexadecimal integer.
</ResponseField>

## Example

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": ["latest"],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x1f"
  }
  ```
</CodeGroup>
