Skip to main content

getBlockTransactionCountByNumber

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

Parameters

QUANTITY | TAG

integer of a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.

params: [
'0xe8', // 232
]

Returns

QUANTITY

integer of the number of transactions in this block.

Requests

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://testnode.jumbochain.org");
var content = new StringContent("{\n\t\"jsonrpc\":\"2.0\",\n\t\"method\":\"jumbo_getBlockTransactionCountByNumber\",\n\t\"params\":[\n\t\t\"0x52A8CA\"\n\t],\n\t\"id\":1\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());