curl --request POST \
--url https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}Tempo API method that returns the current maximum priority fee per gas. This is the fee tip that goes to validators on top of the base fee.Documentation Index
Fetch the complete documentation index at: https://chainstack-mintlify-flesh-empty-pages.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
result — the current max priority fee per gas encoded as hexadecimal (in wei)eth_maxPriorityFeePerGas code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const getMaxPriorityFee = async () => {
const feeData = await provider.getFeeData();
console.log(`Max Priority Fee: ${ethers.formatUnits(feeData.maxPriorityFeePerGas, "gwei")} gwei`);
// Or using raw RPC
const maxPriorityFee = await provider.send("eth_maxPriorityFeePerGas", []);
console.log(`Raw response: ${maxPriorityFee}`);
console.log(`In gwei: ${ethers.formatUnits(maxPriorityFee, "gwei")}`);
};
getMaxPriorityFee();
Was this page helpful?