Last updated on January 1, 1970

41 min read

Method eth_feeHistory undefined ()
connect with JSON-RPC 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

curl --location --request POST 'https://matic.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": [61, "latest", [20, 60, 73]],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "baseFeePerGas": [
            "0x1c296722b0",
            "0x1b65a9eece",
            "0x1ad8827d54",
            "0x1b044f47d3",
            "0x1a575fba4c",
            "0x1bbaf1683b",
            "0x1aee8ae9ae",
            "0x1c2bdf8674",
            "0x1d826f82a4",
            "0x1d243d3018",
            "0x1c206e9327",
            "0x1b7d8cd4cd",
            "0x1bb9c49444",
            "0x1afc5154a0",
            "0x1c42e072eb",
            "0x1b8f955d49",
            "0x1a6ac479a0",
            "0x1b561dadad",
            "0x1ad9590222",
            "0x1adfd3218d",
            "0x1b3a9c25ce",
            "0x1b01b858ab",
            "0x1bb33e3edc",
            "0x1b1d73941f",
            "0x1a6b5cf094",
            "0x1bf62bc1c9",
            "0x1b27854ee1",
            "0x1b9295ed5d",
            "0x1b16187df6",
            "0x1a082b664a",
            "0x1aaa537414",
            "0x1ac99ea20d",
            "0x1a4fbb4ece",
            "0x1aca7cfa23",
            "0x1baae7f431",
            "0x1b207d5981",
            "0x1a0fddb3e8",
            "0x1b3c10fcfc",
            "0x1c882cb728",
            "0x1c9652250d",
            "0x1c6ed87bf8",
            "0x1bc6704212",
            "0x1cb1cbc157",
            "0x1c264c2b9b",
            "0x1b214c23fa",
            "0x1bf1cadf9b",
            "0x1bacf43d7b",
            "0x1c024c2ce3",
            "0x1b88898ea6",
            "0x1bd27421c8",
            "0x1bdb7fe34b",
            "0x1b1fdf14e2",
            "0x1b8c44a80f",
            "0x1bd0d88f14",
            "0x1ae442496d",
            "0x1c1cd00289",
            "0x1ba49b896a",
            "0x1ce2f0c070",
            "0x1c2f2df8d5",
            "0x1b248fcfb9",
            "0x1c7ac3c322",
            "0x1bf29b7857"
        ],
        "gasUsedRatio": [
            0.2827958,
            0.3389953333333333,
            0.5509857,
            0.2999676,
            0.9218292666666666,
            0.26965543333333336,
            0.8682106666666667,
            0.8799983,
            0.40024766666666667,
            0.22139543333333334,
            0.31903106666666664,
            0.5684531,
            0.2864678666666667,
            0.8781633333333333,
            0.3017455666666667,
            0.1679895,
            0.7784049,
            0.3573693333333333,
            0.5075387333333333,
            0.6055669,
            0.4347089,
            0.7054153666666667,
            0.33101223333333335,
            0.2947536666666667,
            0.9669959333333333,
            0.26904693333333335,
            0.6232132333333333,
            0.3589066,
            0.188581,
            0.6946606666666667,
            0.5366741,
            0.3578072333333333,
            0.6457974,
            0.7617695,
            0.3436614333333333,
            0.18593963333333333,
            0.8599596666666667,
            0.8810730333333333,
            0.5154938333333333,
            0.45684776666666665,
            0.31490786666666665,
            0.7648021333333334,
            0.3480781333333333,
            0.2102533,
            0.7401568,
            0.42301883333333334,
            0.5963659,
            0.36415043333333336,
            0.5838940666666667,
            0.5101604383347005,
            0.28952179918679927,
            0.6248833920607645,
            0.5777936879810219,
            0.23420348137150607,
            0.8632095873964145,
            0.3663797645902077,
            0.8598705938460351,
            0.30553096341508895,
            0.2043812291030832,
            0.8939841577901434,
            0.3505973979317672
        ],
        "oldestBlock": "0x295823f",
        "reward": [
            [
                "0x6fc23ac00",
                "0xab3cdef50",
                "0xca217c0c0"
            ],
            [
                "0x6fc23ac00",
                "0xb778b2332",
                "0xc107abfda"
            ],
            [
                "0x6fc23ac00",
                "0xc04b294ac",
                "0xc04b294ac"
            ],
            [
                "0x6fc23ac00",
                "0xa39aca0dd",
                "0xbd8e5ca2d"
            ],
            [
                "0xaac3cdb4",
                "0xaac3cdb4",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x9fb04f80d",
                "0xb2243a9c5"
            ],
            [
                "0x13989e52",
                "0x13989e52",
                "0x8077a9655"
            ],
            [
                "0x68b358dc7",
                "0x68b358dc7",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x95ac58f5c",
                "0xb2221da5a"
            ],
            [
                "0x6fc23ac00",
                "0xa4c6225be",
                "0xbb16ccc2c"
            ],
            [
                "0x6fc23ac00",
                "0xaa32ab371",
                "0xabcc67ed9"
            ],
            [
                "0x7301db33",
                "0x7301db33",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xb23707dbc",
                "0xb23707dbc"
            ],
            [
                "0x5d23360",
                "0x5d23360",
                "0x6fc23ac00"
            ],
            [
                "0x6a9d1e915",
                "0xa9a549f15",
                "0xc61b0ea13"
            ],
            [
                "0x8077a9655",
                "0xb4d9fb4b7",
                "0xb4d9fb4b7"
            ],
            [
                "0x5bc44460",
                "0x8077a9655",
                "0xa464a1cd9"
            ],
            [
                "0x6fc23ac00",
                "0xb87176453",
                "0xd68b26853"
            ],
            [
                "0x6fc23ac00",
                "0xc03dc0fde",
                "0xdf225e14e"
            ],
            [
                "0x6fc23ac00",
                "0x1176592e00",
                "0x1176592e00"
            ],
            [
                "0x6fc23ac00",
                "0x7ac67a0b1",
                "0xb4a7117b1"
            ],
            [
                "0x6b2f55",
                "0x6b2f55",
                "0x6b2f55"
            ],
            [
                "0x6fc23ac00",
                "0x8539a3341",
                "0xb03a7b4f4"
            ],
            [
                "0x6fc23ac00",
                "0xa1a2f2b6c",
                "0xba625b279"
            ],
            [
                "0x96c6976c",
                "0x6fc23ac00",
                "0x7cb62e13a"
            ],
            [
                "0x6fc23ac00",
                "0xacd6d84cf",
                "0xb1c544df3"
            ],
            [
                "0xc909611f",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x869163e32",
                "0xb3103593b"
            ],
            [
                "0x6fc23ac00",
                "0xbad80c8a2",
                "0xc600c30b2"
            ],
            [
                "0x8a7368492",
                "0xba43b7400",
                "0xba43b7400"
            ],
            [
                "0x6fc23ac00",
                "0x72b293a0e",
                "0x991c6a0cd"
            ],
            [
                "0x6fc23ac00",
                "0x7489d87e9",
                "0x9e0a50108"
            ],
            [
                "0x76cd6f32",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xb23fe11a8",
                "0xc12b817dd"
            ],
            [
                "0x6fc23ac00",
                "0xb18b15267",
                "0xd2ac20813"
            ],
            [
                "0x6fc23ac00",
                "0xba31bed17",
                "0xba31bed17"
            ],
            [
                "0xf245d418",
                "0xf245d418",
                "0x6fc23ac00"
            ],
            [
                "0x5d63c119c",
                "0x5d63c119c",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x1176592e00",
                "0x1176592e00"
            ],
            [
                "0x6fc23ac00",
                "0x7b2b290ef",
                "0xa06471ffa"
            ],
            [
                "0x6fc23ac00",
                "0xb465c4f49",
                "0xc5ca66778"
            ],
            [
                "0x2a1e6dee",
                "0x6fc23ac00",
                "0x7bde02116"
            ],
            [
                "0x6fc23ac00",
                "0x8d4189183",
                "0x9c81b9d8d"
            ],
            [
                "0x6fc23ac00",
                "0xcd14b67d9",
                "0xd8ffef214"
            ],
            [
                "0xcf428c06",
                "0x7a4026602",
                "0x88ca3495d"
            ],
            [
                "0x6837b32ca",
                "0x8d7bdcc65",
                "0xaeb6a3265"
            ],
            [
                "0x439a7285",
                "0x6fc23ac00",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xac14d19b5",
                "0xadae8e51d"
            ],
            [
                "0x6805215a",
                "0x78c03450",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0xaf12524d0",
                "0xaf12524d0"
            ],
            [
                "0x6fc23ac00",
                "0xa6901d240",
                "0xae819634d"
            ],
            [
                "0x7e979dc2b",
                "0xba43b7400",
                "0xba43b7400"
            ],
            [
                "0x6fc23ac00",
                "0x7b589339b",
                "0x7b589339b"
            ],
            [
                "0x6fc23ac00",
                "0x7b377d414",
                "0xaf2c0b784"
            ],
            [
                "0x1de13e93",
                "0x1de13e93",
                "0x6fc23ac00"
            ],
            [
                "0x6fc23ac00",
                "0x9dfa2c054",
                "0xaa6c9440f"
            ],
            [
                "0x4bf32696",
                "0x4bf32696",
                "0x4bf32696"
            ],
            [
                "0x6fc23ac00",
                "0x9e0a88628",
                "0xbd0472660"
            ],
            [
                "0x7c9a91698",
                "0xcbc54541d",
                "0xdeec33f02"
            ],
            [
                "0xcbfee047",
                "0xcbfee047",
                "0xcbfee047"
            ],
            [
                "0x6fc23ac00",
                "0xa20aeb00e",
                "0xa48d58376"
            ]
        ]
    }
}
banner icon

Start Building with GetBlock RPCs for Free