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: 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
| Field | Type |
|---|---|
| result | object |
Examples
curl https://triport.io/eth \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"eth_maxPriorityFeePerGas","params":[],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/eth", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "eth_maxPriorityFeePerGas",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/eth",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"eth_maxPriorityFeePerGas","params":[],"jsonrpc":"2.0"},
)
print(resp.json()){
"id": 1,
"result": "0x1",
"jsonrpc": "2.0"
}Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- 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.