getRecentPrioritizationFees – Solana
The getRecentPrioritizationFees JSON-RPC method retrieves a list of prioritization fees from recent blocks.
The getRecentPrioritizationFees RPC Solana method provides insight into the dynamic fee market within the Solana blockchain.
The getRecentPrioritizationFees method retrieves recent prioritization fees paid by transactions in the Solana blockchain. It provides insight into the dynamic fee market, helping developers estimate the cost of prioritizing transactions for faster processing. This method is useful for optimizing transaction fees and improving the efficiency of fee-based strategies in Solana applications.
Supported Networks
This method is available on the following API endpoints:
Mainnet
Devnet
Parameters
Optional Parameters
array (optional): An array of up to 128 account addresses, provided as base-58 encoded strings.
If provided, the response reflects the fee required for a transaction locking all specified accounts as writable.
Result
The response returns an array of RpcPrioritizationFee objects, each containing:
slot (u64): The slot in which the prioritization fee was observed.
prioritizationFee (u64): The per-compute-unit fee paid by at least one successfully landed transaction, measured in micro-lamports (0.000001 lamports).
Request Example
API Endpoints
cURL Example
Response
A successful request returns an array of recent prioritization fees for the specified accounts (or general network fees if no accounts are provided).
Example Response
Error Handling
Common getRecentPrioritizationFees error scenarios:
Invalid account address: If an incorrectly formatted or non-existent account is provided.
Network errors: Connectivity issues with the Solana JSON-RPC API endpoints.
Malformed request: Incorrectly structured JSON requests.
Example Error Response
Use Cases
The Solana getRecentPrioritizationFees method is useful for:
dApp developers: Estimating transaction prioritization fees for faster execution.
Web3 analytics tools: Tracking fee trends over recent blocks.
Blockchain explorers: Displaying historical prioritization fee data.
Validators and node operators: Monitoring network fee dynamics and congestion levels.
Code getRecentPrioritizationFees Example – Web3 Integration
Integration with Web3
By integrating Web3 getRecentPrioritizationFees into Solana’s Core API, developers can optimize transaction execution strategies by analyzing recent prioritization transaction fees. The JSON-RPC request provides valuable insights into the dynamic fee structure, helping dApps, validators, and infrastructure services efficiently navigate Solana’s network conditions.
Last updated