Params- a string array containing (required):
blockCount(integer number, required)- number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
newestBlock(string, required)- highest number block of the requested range.
rewardPercentiles(an array of integer, optional)- a monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.
Object- An object with the following fields:
id(integer number)- json-rpc id.
jsonrpc(string)- json-rpc version.
result(object)- an object with the following fields:
oldestBlock(integer number)- lowest number block of the returned range.
baseFeePerGas(an array of hex string)- an array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
gasUsedRatio(an array of decimal number)- an array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.
reward(an array of hex string array)- an array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.