Ethereum

Ethereum

eth_maxPriorityFeePerGas

eth_maxPriorityFeePerGas returns the node's suggested priority fee, the tip in wei that a sender adds on top of the burned base fee to get a transaction picked up by the next Ethereum validator. Since the London upgrade brought EIP-1559, a type-2 transaction sets maxFeePerGas and maxPriorityFeePerGas separately; this call gives you a reasonable number for the second of those. The node derives it heuristically from recent block history rather than reading a fixed price. Query it at https://ethereum.therpc.io/YOUR_API_KEY on chain ID 1 with no parameters, and you get a hex-encoded wei value back, denominated in ETH's smallest unit.

Use cases

  • Fill in the maxPriorityFeePerGas field of an EIP-1559 (type-2) transaction before signing, so your tip tracks current Ethereum demand instead of a stale constant.
  • Seed a wallet's fee picker with a sensible default tip, then let the user nudge it up for faster inclusion during congestion.

Parameters

This method takes no parameters. Pass an empty array [].

Response

TypeDescription
stringHex-encoded priority fee in wei. This is the node's heuristic — typically derived from recent block history.

Example request

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}'

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32000method not supportedThe connected network does not implement EIP-1559 and does not support this method.

Common pitfalls

  • The value is a heuristic, not a protocol constant. Two different clients (geth versus erigon, say) can return slightly different tips for the same block, so treat it as a starting estimate.
  • This is an EIP-1559 method. On a chain or fork without the London fee market it can error or hand back a meaningless number; in those cases fall back to eth_gasPrice and a legacy transaction.
  • When you need precision, for example a tip pegged to a specific percentile of recent blocks, build it from eth_feeHistory with explicit reward percentiles rather than this single suggested value.

Supported networks

  • Mainnet — Chain ID: 1
  • Sepolia — Chain ID: 11155111

See also

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_maxPriorityFeePerGas","params":[]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.