TriportRPC

eth_maxPriorityFeePerGas

Last updated:

`eth_maxPriorityFeePerGas` returns a suggested **priority fee** — the tip paid directly to the validator on top of the protocol base fee — expressed in wei as a hex-encoded quantity. It is the EIP-1559 complement to [`eth_gasPrice`](./eth_gasPrice.md): where `eth_gasPrice` gives a single legacy gas price, this method isolates just the tip portion so you can build a `maxPriorityFeePerGas` value for a type-2 (EIP-1559) transaction.

Use it when constructing a transaction's fee fields. A common pattern is to read the pending block's `baseFeePerGas`, add the value returned here as the tip, and set `maxFeePerGas` to roughly `baseFee * 2 + tip` to absorb base-fee swings between blocks.

The returned value is a node-side **suggestion** derived from recent block history, not a guarantee of inclusion. During periods of volatile demand the suggestion can change block-to-block, so re-query it close to the moment you sign and broadcast.

Parameters

This method takes no parameters.

Returns

eth_maxPriorityFeePerGas return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_maxPriorityFeePerGas","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "eth_maxPriorityFeePerGas",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"eth_maxPriorityFeePerGas","params":[],"jsonrpc":"2.0"})
print(resp.json())
{
  "id": 1,
  "result": "0x1",
  "jsonrpc": "2.0"
}

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 1 per call.

FAQ

What does eth_maxPriorityFeePerGas do?
Returns a suggested priority fee (miner tip), in wei, for inclusion in the next block under EIP-1559.
How many credits does eth_maxPriorityFeePerGas cost?
eth_maxPriorityFeePerGas costs 1 credit(s) per call on Triport by default.
Is eth_maxPriorityFeePerGas available over WebSocket?
eth_maxPriorityFeePerGas is an HTTP JSON-RPC method.