getPriorityFeeEstimate
Estimates the priority fee (in microlamports) required for a transaction. This method can also estimate the optimal Jito fee. Requires either a serialized transaction, or an array of Solana account public keys.
POST Category: transaction
Parameters
| Name | Type | Description |
|---|---|---|
request | object | Requires either a serialized transaction, or an array of Solana account public keys. (required) |
request.transaction | string | The transaction to calculate priority fees for. Can be base58 or base64 encoded. If a transaction is supplied, the transactionEncoding option must be set accordingly. (optional) |
request.accountKeys | array | If specified in lieu of a transaction, this array of public keys is used to calculate priority fees. (optional) |
request.options | object | Configuration object. (optional) |
request.options.transactionEncoding | string | Format of the provided transaction, either 'Base58' or 'Base64'. (optional) |
request.options.priorityLevel | string | The priority level for the transaction, from slowest to fastest: Min, Low, Medium, High, VeryHigh, UnsafeMax. (optional) |
request.options.includeAllPriorityFeeLevels | boolean | If true, returns estimates for all priority fee levels instead of just one level. (optional) |
request.options.includeJito | boolean | If set to true, this will additionally estimate the best jito fee. (optional) |
request.options.lookbackSlots | number | Number of recent slots used to estimate priority fees. Must be between 1 and 150. (optional) |
request.options.includeVote | boolean | When true, includes Vote transactions in the priority fee calculation. (optional) |
request.options.recommended | boolean | When true, returns a single recommended fee instead of requiring a priority level. (optional) |
request.options.evaluateEmptySlotAsZero | boolean | When set, slots with no transactions are treated as zero-fee slots. (optional) |
Response
object — A result object containing the estimated priority fee and/or estimates for each priority fee level.
| Name | Type | Description |
|---|---|---|
priorityFeeEstimate | float | The estimated priority fee in microlamports. |
priorityFeeLevels | object | An object containing fee estimates (microlamports) at different priority fee levels. |
priorityFeeLevels.min | float | The minimum viable fee. |
priorityFeeLevels.low | float | A low fee level, suitable for low network congestion or non-urgent transactions. |
priorityFeeLevels.medium | float | A reasonable fee for ordinary transactions that are not time-sensitive. |
priorityFeeLevels.high | float | A higher fee for time-sensitive transactions, like trades. |
priorityFeeLevels.veryHigh | float | A very high priority fee for transactions requiring the fastest execution. |
priorityFeeLevels.unsafeMax | float | Matches the maximum currently observed fee on Solana, even if unreasonable. Fastest during congestion, but risky. |
jitoTipEstimate | object | An object containing jito fee estimates (microlamports) at different priority fee levels. |
jitoTipEstimate.low | float | A low fee level, suitable for low network congestion or non-urgent transactions. |
jitoTipEstimate.medium | float | A reasonable fee for ordinary transactions that are not time-sensitive. |
jitoTipEstimate.high | float | A higher fee for time-sensitive transactions, like trades. |
Example Request
curl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getPriorityFeeEstimate",
"params": [
{
"transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEEjNmKiZGiOtSZ+g0//wH5kEQo3+UzictY+KlLV8hjXcs44M/Xnr+1SlZsqS6cFMQc46yj9PIsxqkycxJmXT+veJjIvefX4nhY9rY+B5qreeqTHu4mG6Xtxr5udn4MN8PnBt324e51j94YQl285GzN2rYa/E2DuQ0n/r35KNihi/zamQ6EeyeeVDvPVgUO2W3Lgt9hT+CfyqHvIa11egFPCgEDAwIBAAkDZAAAAAAAAAA=",
"options": {
"transactionEncoding": "Base64",
"includeAllPriorityFeeLevels": true,
"includeJito": true
}
}
]
}'
Example Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"priorityFeeEstimate": 100000,
"priorityFeeLevels": {
"min": 1,
"low": 510,
"medium": 8040,
"high": 100000,
"veryHigh": 1000000,
"unsafeMax": 7151020
},
"jitoTipEstimate": {
"low": 1000,
"medium": 5115,
"high": 12023804
}
}
}
Developer Guide
getPriorityFeeEstimate Solana Developer Guide — Set an accurate Solana priority fee: size the compute unit limit from a simulation, then price it with getPriorityFeeEstimate before you sign and send.