Learn getRecentPrioritizationFees use cases, code examples, request parameters, response structure, and tips.
getRecentPrioritizationFees
RPC method provides insights into the prioritization fees paid in recent blocks on the Solana network. By examining these fees, developers can make more informed decisions about the additional fee (priority fee) to attach to their transactions to increase their likelihood of being processed promptly, especially during periods of high network activity.
Nodes typically cache prioritization fee data for up to 150 recent blocks.
lockedWritableAccounts
(array
of string
, optional):
result
field of the JSON-RPC response is an array of prioritization fee objects. Each object details fees from a specific recent slot and has the following structure:
slot
(u64
): The slot number in which the transactions contributing to this fee data were processed.prioritizationFee
(u64
): The minimum prioritization fee (in micro-Lamports per Compute Unit) paid by at least one transaction in this slot (and matching the lockedWritableAccounts
filter, if any). A value of 0
often means that no transactions in that slot (matching the criteria) paid an additional priority fee beyond the base fee, or the node did not observe any for the given accounts.prioritizationFee
of 0
doesn’t necessarily mean no fees were paid, but rather that for the given slot and account(s), the sampled transactions did not include a priority fee, or were below a threshold the node considers significant.prioritizationFee_per_CU * your_transaction_compute_units
. You also need to set the compute unit limit for your transaction (ComputeBudgetProgram.setComputeUnitLimit
) and the price (ComputeBudgetProgram.setComputeUnitPrice
).getRecentPrioritizationFees
effectively can significantly improve transaction confirmation reliability in dynamic network conditions.