New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

Last updated on January 1, 1970

41 min read

Method eth_feeHistory Polygon (MATIC)
connect with WS protocol

eth_feeHistory

info-circle-fill

Returns a list of historical gas information.

Parameters

DATA, 8 Bytes - None

Number of blocks in the requested range.

DATA, 32 Bytes - None

Number of newest block in the requested range.

DATA, 32 Bytes - None

Optional monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used.

Request

wscat -c wss://matic.getblock.io/YOUR-API-KEY/mainnet/ 
# wait for connection and send the request body 
{"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": [61, "latest", [20, 60, 73]],
"id": "getblock.io"}

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "baseFeePerGas": [
            "0x1add04be95",
            "0x1b5d165d18",
            "0x1b6ce64b9f",
            "0x1aebfd5f0d",
            "0x1c7441e749",
            "0x1bb34fdcdb",
            "0x1c5978c440",
            "0x1bb814dfc4",
            "0x1cc657e94b",
            "0x1c69732da5",
            "0x1b977ac707",
            "0x1c6dbd3bb7",
            "0x1c4c97e566",
            "0x1b5bd6a206",
            "0x1c55c3f17a",
            "0x1be757c568",
            "0x1c973e9ef5",
            "0x1c4746e75e",
            "0x1b43700589",
            "0x1c39b66d66",
            "0x1ba3c992a5",
            "0x1ce46edd6e",
            "0x1c11913c61",
            "0x1b4c0e4900",
            "0x1adcd9f66d",
            "0x1c0a6dad4e",
            "0x1c58d1f5ff",
            "0x1d510193a2",
            "0x1c8e05396a",
            "0x1bd3c05d90",
            "0x1ce57d359a",
            "0x1c8df1a33d",
            "0x1bb517c45c",
            "0x1b7ba5452d",
            "0x1b5e6360e9",
            "0x1ac934af8b",
            "0x1bc88ef693",
            "0x1bc1fb9be8",
            "0x1b0bc5be96",
            "0x1a6e4776e6",
            "0x1b8fb85042",
            "0x1b751c3bd7",
            "0x1b22e2667f",
            "0x1b16b8c276",
            "0x1b1c1d96ae",
            "0x1a6dccab2b",
            "0x1bdb37fa86",
            "0x1b960cf753",
            "0x1af48b1120",
            "0x1c1bf7f23d",
            "0x1c63ec6dee",
            "0x1b61e1491c",
            "0x1c72034fee",
            "0x1bcced9741",
            "0x1cb225a87a",
            "0x1c4ed8b92a",
            "0x1c70aafc8f",
            "0x1c450dcd2d",
            "0x1c03a86484",
            "0x1dc3bbaf11",
            "0x1f97ebb27f",
            "0x1e6efa6e2e"
        ],
        "gasUsedRatio": [
            0.6489818,
            0.518058,
            0.353113,
            0.9553317333333333,
            0.28809593333333333,
            0.6874516666666667,
            0.3220976,
            0.8046885666666667,
            0.39911576666666665,
            0.2690556,
            0.7426674480963995,
            0.46356467581817545,
            0.2341411196769211,
            0.7854743116401672,
            0.3782176673000085,
            0.6969965722320486,
            0.4125946467409946,
            0.21285598316170604,
            0.7822863549226564,
            0.33400921559710695,
            0.8625271691712333,
            0.27192709479153643,
            0.2801019452737909,
            0.3726920343248281,
            0.8508314966127218,
            0.5873636531359004,
            0.7736030312632919,
            0.29215392306899773,
            0.29614942849578985,
            0.8074084208447494,
            0.4053244000063013,
            0.2626782712538596,
            0.435207653256638,
            0.4667323738734378,
            0.32966127530153827,
            0.7979086588013689,
            0.49260395278604124,
            0.29486534518666085,
            0.31802604544799273,
            0.8422156082946656,
            0.4698290899762934,
            0.4064166922399217,
            0.48599352104338106,
            0.5062224422978754,
            0.29906259424765874,
            0.9320780482804895,
            0.42240537417510005,
            0.31704190255674186,
            0.842495134229678,
            0.5799948048984103,
            0.21596450758909444,
            0.8105706982149725,
            0.31863822478450493,
            0.757660619813754,
            0.3918611073228749,
            0.5373363399171222,
            0.4520769195417196,
            0.42770966850679076,
            0.9998290097030144,
            0.9915527026775863,
            0.20628549210628583
        ],
        "oldestBlock": "0x29582d6",
        "reward": [
            [
                "0x11389f16b",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6e23422e2",
                "0x760318b75",
                "0x9c7652400"
            ],
            [
                "0x7cd6e5932",
                "0xb75137a61",
                "0xd314a3447"
            ],
            [
                "0x162628f3",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x7d4c2ceb3",
                "0x8feb462c2"
            ],
            [
                "0x3d3ed325",
                "0x6fc23ac00",
                "0xb104969bd"
            ],
            [
                "0x6fc23ac00",
                "0xa6a208258",
                "0xc920988b2"
            ],
            [
                "0x3879d03c",
                "0x3879d03c",
                "0x6fc23ac00"
            ],
            [
                "0x6b56ef23a",
                "0x6fc23ac00",
                "0x9fd415d4d"
            ],
            [
                "0x6fc23ac00",
                "0x9c7652400",
                "0xa5a2618f3"
            ],
            [
                "0x5913e8f9",
                "0x6fc23ac00",
                "0xa3111dc93"
            ],
            [
                "0x6fc23ac00",
                "0xa55dc0ae1",
                "0xae8311bb5"
            ],
            [
                "0x6fc23ac00",
                "0xb09567206",
                "0xc93c9a9b7"
            ],
            [
                "0x94b80dfa",
                "0x94b80dfa",
                "0x94b80dfa"
            ],
            [
                "0x6a4620fc1",
                "0x9b303f374",
                "0xa6dd5551e"
            ],
            [
                "0x936ea98",
                "0x6fc23ac00",
                "0x979d4e5fe"
            ],
            [
                "0x6fc23ac00",
                "0xa2c5aa7a3",
                "0xc4922f028"
            ],
            [
                "0x6fc23ac00",
                "0xc2c750903",
                "0xc991aa7bf"
            ],
            [
                "0xad1eaa77",
                "0xad1eaa77",
                "0xad1eaa77"
            ],
            [
                "0x65d32b462",
                "0x845f08221",
                "0xa89e2d932"
            ],
            [
                "0x6fc23ac00",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x9df2a692a",
                "0xbd0a45f62"
            ],
            [
                "0x6fc23ac00",
                "0x9fae0b367",
                "0xab2080a37"
            ],
            [
                "0xaa764800",
                "0x6fc23ac00",
                "0x861d2b8a3"
            ],
            [
                "0x25499193",
                "0x25499193",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x788f49da7",
                "0xab0cf083b"
            ],
            [
                "0x6fc23ac00",
                "0x6fc23ac00",
                "0xa6ac75099"
            ],
            [
                "0x6fc23ac00",
                "0xb8f5ffb7b",
                "0xc4e55dd64"
            ],
            [
                "0x9f934426b",
                "0xa35940d2e",
                "0xc3b46dc1c"
            ],
            [
                "0x1cce5270",
                "0x1cce5270",
                "0x6fc23ac00"
            ],
            [
                "0x66f786c65",
                "0x856003044",
                "0x9de1c10fe"
            ],
            [
                "0x6fc23ac00",
                "0xc526febe0",
                "0xd38533509"
            ],
            [
                "0x416ccca4",
                "0x7d511210e",
                "0xb0e81823c"
            ],
            [
                "0x6fc23ac00",
                "0xb47f4016b",
                "0xbe5cc1f00"
            ],
            [
                "0x6fc23ac00",
                "0xa9bae9ab1",
                "0xbb996683e"
            ],
            [
                "0x38eed875",
                "0x38eed875",
                "0x38eed875"
            ],
            [
                "0x68f6b5773",
                "0x731970aa8",
                "0xafb0a5005"
            ],
            [
                "0x6fc23ac00",
                "0xaa406f3aa",
                "0xc02268721"
            ],
            [
                "0x71804a272",
                "0xbb7d38802",
                "0xd7aa448dd"
            ],
            [
                "0x93dc111a",
                "0x93dc111a",
                "0x6fc23ac00"
            ],
            [
                "0x61596623c",
                "0x7fa5cfefb",
                "0xb2d05e000"
            ],
            [
                "0x6fc23ac00",
                "0x9c7652400",
                "0xb4e7d0ac1"
            ],
            [
                "0x6fc23ac00",
                "0xba0b6e019",
                "0xdc89fe673"
            ],
            [
                "0x6fc23ac00",
                "0xa5861992f",
                "0xbace08422"
            ],
            [
                "0x6fc23ac00",
                "0xba43b7400",
                "0xdcf64b644"
            ],
            [
                "0x9456dcd5",
                "0x9456dcd5",
                "0x6fc23ac00"
            ],
            [
                "0x6826d497a",
                "0x77e10595d",
                "0x9ad4eb36c"
            ],
            [
                "0x6fc23ac00",
                "0xb2d8c4f45",
                "0xd53daf24a"
            ],
            [
                "0xd9876e0",
                "0xd9876e0",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xccf8a5ab5",
                "0xd38bb23f8"
            ],
            [
                "0x6fc23ac00",
                "0xa5facd8aa",
                "0xc567edb6b"
            ],
            [
                "0x8ead66e4",
                "0x8ead66e4",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xa5195f6aa",
                "0xa5195f6aa"
            ],
            [
                "0x6fc23ac00",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x8a3675ac2",
                "0xa11739e1e"
            ],
            [
                "0xa74c08d6e",
                "0xba43b7400",
                "0xba43b7400"
            ],
            [
                "0x6fc23ac00",
                "0x9c7652400",
                "0xc6e4ead66"
            ],
            [
                "0x6fc23ac00",
                "0xc9b53c1f0",
                "0x20d6c59c5b"
            ],
            [
                "0x68e883ecf",
                "0x6fc23ac00",
                "0x7aaa0eff6"
            ],
            [
                "0x2d4eac8ef",
                "0x6fc23ac00",
                "0x7aef40a00"
            ],
            [
                "0x4d4fc57fb",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ]
        ]
    }
}
banner icon

Start Building with GetBlock RPCs for Free