starknet_getBlockTransactionCount

Returns the number of transactions in the designated block.

Parameters

Object NameRequiredTypeDetail
BLOCK PARAMETERString"block_hash", "block_number", "latest", "pending"
"params": [
    {
        "block_number": 5000
    }
]

Result

The number of transactions in the designated block.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
    "jsonrpc": "2.0",
    "method": "starknet_getBlockTransactionCount",
    "params": [
        {
            "block_number": 5000
        }
    ],
    "id": 0
}'

Return

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