eth_getBlockTransactionCountByNumber
Returns the number of transactions in the block with the given block number. This method uses 150 credits from your daily balance.
Parameters
block number:[Required] A hexadecimal block number, or one of the string tags latest, earliest, pending, or finalized. See the default block parameter.
warning
safe isn't supported. Use finalized instead.
Returns
block transaction count: A hexadecimal equivalent of the integer representing the number of transactions in the block.
Example
Replace <YOUR-API-KEY> with an API key from your MetaMask Developer dashboard.