Improved Priority Fees API
This is currently in staging/beta testing. If you want access to an endpoint for testing, contact us on your customer support channels. After receiving client feedback, we will create a PR to include this feature in the Anza/Solana Labs repositories.
Solana's default RPC stack supports identifying recently paid priority fees globally and per writeable account. Currently, this provides a single number per slot to indicate the minimum priority fee amount. Returning only the minimum priority fee limits the ability of RPC consumers to more clearly identify what priority fees to use in their transactions.
To address this, we have added a percentile
parameter to the Solana JSON RPC `getRecentPrioritizationFees` method that provides you better flexibility to estimate previous priority fees that were paid and, thus, what you might want to add to your transactions.
If you are running your own Solana node or an RPC provider, we provide the patches you can apply to your local Solana validator build to support these new parameters. We encourage everyone to support this new param.
Client API
To help accelerate your development with this change, we've prepared an example repository with examples of API usage and utility functions that you can copy-paste into your JS codebase and get started without additional dependencies.
Sample requests
Request Body:
The response format doesn't change. The only difference is the return value reflects the percentile from the request. The default behavior, when no percentile is provided, is to return the minimum, as before.
Sample CURL requests
You can use the following CURL requests to try out the API (replace localhost:8899 with your RPC endpoint, which is currently on our staging servers only).
Last updated