Solana Priority Fee API Guide
The Solana RPC provides the getRecentPrioritizationFees method to retrieve fee data from recent blocks, helping developers dynamically estimate the right priority fee for their transactions. This method returns an array of fee data objects for the past 150 blocks for a given set of account keys.
Each item in the response contains a slot number and a prioritizationFee value representing the lowest fee (in microlamports per CU) paid by any transaction that successfully landed in that block while writing to the specified accounts.


The limitation of the standard RPC method is that it returns raw per-slot data rather than a consolidated estimate. For this reason, providers like Helius offer the getPriorityFeeEstimate method, which simplifies fee estimation into a single value across six priority levels: Min, Low, Medium, High, VeryHigh, and UnsafeMax.
For production DApps, always pass your target program accounts to getRecentPrioritizationFees to get localized fee data rather than global network averages.

Solana fee markets are localized by program and writable account. A transaction writing to a popular DeFi protocol pool may face very different fee market conditions than a simple SOL transfer. Always pass the specific account keys relevant to your transaction when querying fee data.