For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_maxPriorityFeePerGas - HyperEVM

Example code for the eth_getTransactionByBlockHashAndIndex JSON RPC method. Сomplete guide on how to use eth_getTransactionByBlockHashAndIndex GetBlock JSON RPC in GetBlock Web3 documentation.

This method returns a suggestion for the max priority fee per gas for EIP-1559 transactions.

Parameters

  • None

Request

cURL
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_maxPriorityFeePerGas",
    "params": [],
    "id": "getblock.io"
}'
JavaScript (axios)
const axios = require('axios');

const response = await axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', {
    jsonrpc: '2.0',
    method: 'eth_maxPriorityFeePerGas',
    params: [],
    id: 'getblock.io'
});

console.log('Max Priority Fee:', response.data.result);
Python (requests)
import requests

response = requests.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', json={
    'jsonrpc': '2.0',
    'method': 'eth_maxPriorityFeePerGas',
    'params': [],
    'id': 'getblock.io'
})

print(f'Max Priority Fee: {response.json()["result"]}')

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x0"
}

Response Parameters

Field
Type
Description

result

string

Suggested max priority fee per gas (hex wei).

Use Case

The eth_maxPriorityFeePerGas method is essential for:

  • EIP-1559 transaction fee estimation

  • Setting appropriate priority fees

  • Transaction priority optimization

  • Fee strategy implementation

Error Handling

Error Code
Message
Cause

-32603

Internal error

Node issue

Web3 Integration

Last updated

Was this helpful?