eth_feeHistory
POST
Returns the base fee per gas and gas used ratio for a range of blocks, plus priority fee percentiles when requested. Parameters: blockCount (hex), newestBlock (tag or hex), reward percentiles (array of numbers 0-100, optional).
Sent as a JSON text message over the WebSocket connection wss://blast.nownodes.io/wss/{{api-key}}.
Connection URL:
Copied!
wss://blast.nownodes.io/wss/{{api_key}}.Open the connection, then send the message below as a text frame.
Example:
Copied!
wscat -c 'wss://blast.nownodes.io/wss/YOUR_API_KEY.'
> {"jsonrpc":"2.0","method":"eth_feeHistory","id":1,"params":["0x4","latest",[10,50]]}
Copied!
wss://blast.nownodes.io/wss/{{api-key}}fee history for the last 4 blocks with 10th/50th priority percentiles
invalid parameters
Copied!
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "invalid argument 1: hex string without 0x prefix"
}
}Body
application/json
object
Parameters
api_keystringrequiredpathYour NOWNodes API key.
Response
200OK
A successful response.