Ethereum
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Ethereum
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.Este método no acepta parámetros. Pasa un array vacío [].
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.