eth_getBlockTransactionCountByHash

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

https://api.1inch.com/web3/43114
Supported on:
Avalanche

Parameters

Block hash (required)

Block hash
* string

Request

Request
object
jsonrpc
* string (Enum)
2.0
method
* string
params
array
items
string
id
* number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/43114', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_getBlockTransactionCountByHash',
    params: ['string'],
    id: 1,
  }),
});

const data = await response.json();
console.log(data);

Response

Transaction count

Transaction count
any
oneOf[0]
null
oneOf[1]
string
JSON
1
2
"0x8"

Did you find what you need?