Ethereum
Ethereum
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.
maxPriorityFeePerGas field of an EIP-1559 (type-2) transaction before signing, so your tip tracks current Ethereum demand instead of a stale constant.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Hex-encoded priority fee in wei. This is the node's heuristic — typically derived from recent block history. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32000 | method not supported | The connected network does not implement EIP-1559 and does not support this method. |
eth_gasPrice and a legacy transaction.eth_feeHistory with explicit reward percentiles rather than this single suggested value.