API Reference

eth_getBlockTransactionCountByNumber

Returns the number of transactions in the block with the given block number.

Request Parameters

  • BLOCK PARAMETER [required] - hexadecimal block number, or the string "latest", "earliest" or "pending".

Response

Returns the number of transactions in the block with the given block number.

Result Fields

  • BLOCK TRANSACTION COUNT - a hex code of the integer representing the number of transactions in the provided block

Examples

Example Responses
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x9"
}
Language
Click Try It! to start a request and see the response here!