Skip to main content

qn_estimatePriorityFees RPC Method

Get fee averages and estimates based on recent fee data.

Updated on
Oct 23, 2024

qn_estimatePriorityFees RPC Method

Please note that this RPC method requires the Solana Priority Fee API add-on enabled on your QuickNode endpoint.
Solana Web3.js 2.0 includes the ability to customize RPC methods and transports, allowing you to seamlessly integrate QuickNode Marketplace add-ons into your applications. For more information on how to use QuickNode Marketplace add-ons with Solana Web3.js 2.0, check out these guides: How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 1) and How to Use QuickNode Add-ons using Solana Web3.js 2.0 (Part 2)

Parameters

last_n_blocks
string
(Optional) The number of blocks to look back to calculate averages (the maximum value is 100, and also the default is 100)
account
string
(Optional) The program account to use for the prioritization fee calculation
api_version
integer
(Optional) Specifies the version of the Solana Priority Fee API to use. Version 2 provides more accurately weighted priority fee data

Returns

result
object
The result object which contain the following objects:
context
object
The context object which contains the following fields:
slot
integer
The current slot number
per_compute_unit
object
It provides estimates for priority fees (in microlamports) based on per-compute-unit metrics
extreme
integer
Fee estimate for extreme priority per compute unit (95th percentile)
high
integer
Fee estimate for high priority per compute unit (80th percentile)
medium
integer
Fee estimate for medium priority per compute unit (60th percentile)
low
integer
Fee estimate for low priority per compute unit (40th percentile)
percentiles
object
Fee estimates at various percentiles for per-compute-unit metrics
per_transaction
object
It provides estimates for priority fees based on per-transaction metrics
extreme
integer
Fee estimate for extreme priority per transaction (95th percentile)
high
integer
Fee estimate for high priority per transaction (80th percentile)
medium
integer
Fee estimate for medium priority per transaction (60th percentile)
low
integer
Fee estimate for low priority per transaction (40th percentile)
percentiles
object
Fee estimates at various percentiles for per-transaction metrics
Request
1
curl https://docs-demo.solana-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"jsonrpc": "2.0",
6
"id": 1,
7
"method": "qn_estimatePriorityFees",
8
"params": {
9
"last_n_blocks": 100,
10
"account": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
11
"api_version": 2
12
}
13
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free