get https://example.com
Xlayer API - Returns the number of transactions in a block matching the given block hash.
Parameters
- DATA, 32 Bytes - Hash of a block.
params: ["0x71f344107b58bcbd0e4b844406ef82d4e4c92947a57016835720e99dbeb1d793"];
Returns
QUANTITY - Integer of the number of transactions in this block.
Example
Request
curl https://xlayer-mainnet.unifra.io/v1/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x71f344107b58bcbd0e4b844406ef82d4e4c92947a57016835720e99dbeb1d793"],"id":0}'
URL: https://xlayer-mainnet.unifra.io/v1/your-api-key
RequestType: POST
Body:
{
"jsonrpc":"2.0",
"method":"eth_getBlockTransactionCountByHash",
"params":["0x71f344107b58bcbd0e4b844406ef82d4e4c92947a57016835720e99dbeb1d793"],
"id":0
}
Result
{
"jsonrpc":"2.0",
"id":0,
"result":"0x3"
}
Try API with your API KEY.