post https://api.zan.top/node/v1/polygon/mainnet/
Returns historical gas information, allowing you to track trends over time.
Request Parameters
- blockCount: integer - Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned.
- newestBlock: string - Integer representing the highest number block of the requested range, or one of the string tags latest, earliest, or pending
- rewardPercentiles - [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.
Response
Returns an object of historical gas information.
Result Fields
- oldestBlock - Lowest number block of the returned range expressed as a hexidecimal number.
- baseFeePerGas - 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. Returns zeroes for blocks created before EIP-1559.
- gasUsedRatio - An array of block gas used ratios. These are calculated as the ratio of
gasUsed
andgasLimit
. - reward - An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.
Examples
Example Responses
{
"jsonrpc": "2.0",
"result": {
"baseFeePerGas": [
"0x3da8e7618",
"0x3e1ba3b1b",
"0x3dfd72b90",
"0x3d64eee76",
"0x3d4da2da0",
"0x3ccbcac6b"
],
"gasUsedRatio": [
0.5290747666666666,
0.49240453333333334,
0.4615576,
0.49407083333333335,
0.4669053
],
"oldestBlock": "0xfab8ac",
"reward": [
[
"0x59682f00",
"0x59682f00"
],
[
"0x59682f00",
"0x59682f00"
],
[
"0x3b9aca00",
"0x59682f00"
],
[
"0x510b0870",
"0x59682f00"
],
[
"0x3b9aca00",
"0x59682f00"
]
]
},
"id": 1
}