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

# eth_getBlockTransactionCountByHash

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

This method will use `40` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash)

## **Parameters**

`DATA`, 32 Bytes - hash of a block

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
params: [
  "0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f"
]
```

## **Returns**

`QUANTITY` - integer of the number of transactions in this block.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5"
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f"],"id":1}'
```

```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://testnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x9a8eb09f20182c1cf05f398b3d3a46c42ca5c4c56d3b2af8d4c7cba34dc5d1b9"],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.