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

NameTypeDescription
requestobjectRequires either a serialized transaction, or an array of Solana account public keys. (required)
request.transactionstringThe 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.accountKeysarrayIf specified in lieu of a transaction, this array of public keys is used to calculate priority fees. (optional)
request.optionsobjectConfiguration object. (optional)
request.options.transactionEncodingstringFormat of the provided transaction, either 'Base58' or 'Base64'. (optional)
request.options.priorityLevelstringThe priority level for the transaction, from slowest to fastest: Min, Low, Medium, High, VeryHigh, UnsafeMax. (optional)
request.options.includeAllPriorityFeeLevelsbooleanIf true, returns estimates for all priority fee levels instead of just one level. (optional)
request.options.includeJitobooleanIf set to true, this will additionally estimate the best jito fee. (optional)
request.options.lookbackSlotsnumberNumber of recent slots used to estimate priority fees. Must be between 1 and 150. (optional)
request.options.includeVotebooleanWhen true, includes Vote transactions in the priority fee calculation. (optional)
request.options.recommendedbooleanWhen true, returns a single recommended fee instead of requiring a priority level. (optional)
request.options.evaluateEmptySlotAsZerobooleanWhen 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.

NameTypeDescription
priorityFeeEstimatefloatThe estimated priority fee in microlamports.
priorityFeeLevelsobjectAn object containing fee estimates (microlamports) at different priority fee levels.
priorityFeeLevels.minfloatThe minimum viable fee.
priorityFeeLevels.lowfloatA low fee level, suitable for low network congestion or non-urgent transactions.
priorityFeeLevels.mediumfloatA reasonable fee for ordinary transactions that are not time-sensitive.
priorityFeeLevels.highfloatA higher fee for time-sensitive transactions, like trades.
priorityFeeLevels.veryHighfloatA very high priority fee for transactions requiring the fastest execution.
priorityFeeLevels.unsafeMaxfloatMatches the maximum currently observed fee on Solana, even if unreasonable. Fastest during congestion, but risky.
jitoTipEstimateobjectAn object containing jito fee estimates (microlamports) at different priority fee levels.
jitoTipEstimate.lowfloatA low fee level, suitable for low network congestion or non-urgent transactions.
jitoTipEstimate.mediumfloatA reasonable fee for ordinary transactions that are not time-sensitive.
jitoTipEstimate.highfloatA 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.

← Back to all methods