Priority Fee API

Additional fees paid to prioritize transactions in the network

What Are Priority Fees on Solana?

Priority fees are optional fees you can add to your transactions to incentivize block producers (leaders) to include your transaction in the next block. You should include a priority fee in your transactions, but how much should you pay?

RapidNode Priority Fee API

RapidNode' getPriorityFeeEstimate is a RPC method that provides fee recommendations based on historical data. Most importantly, it considers both global and local fee markets.

To use this API, you must provide one of the following in the params:

  • transaction: A serialized, signed transaction. (recommended)

  • accountKeys: A list of account keys involved in the transaction.

Optional Parameters

  • transactionEncoding: Specifies the encoding of the transaction. Defaults to Base58, but can be set to formats like Base64.

  • priorityLevel: Allows you to set a custom priority level for the fee. The levels and their corresponding percentiles are:

    • Min: 0th percentile

    • Low: 25th percentile

    • Medium: 50th percentile

    • High: 75th percentile

    • VeryHigh: 95th percentile

    • UnsafeMax: 100th percentile (use with caution).

  • includeAllPriorityFeeLevels: If enabled, the API will return fee estimates for all priority levels.

  • lookbackSlots: Determines how many recent slots are analyzed to calculate the fee. Default is 50, with a range of 1–300.

  • includeVote: If true, it includes vote transactions for the fee calculation.

  • recommended: Provides a default recommended fee based on the median (50th percentile), excluding vote transactions.

  • evaluateEmptySlotAsZero: When enabled, the API treats empty blocks as zero-fee slots, lowering fee estimates during low congestion and preventing overpayment during minimal network activity.

Last updated