TriportRPC

getRecentPrioritizationFees

Last updated:

getRecentPrioritizationFees returns a list of the prioritization fees observed in recent blocks — up to the last 150 blocks. Each entry pairs a slot with the prioritizationFee (in micro-lamports per compute unit) that was sufficient to land a transaction in that block.

Use this method to size the priority fee before submitting a transaction. A common strategy is to fetch the recent fees, take a percentile (for example the median or the 75th percentile of the non-zero values), and set your compute-unit price accordingly via a ComputeBudget instruction.

The optional addresses parameter narrows the result to blocks where a transaction wrote to one of the given accounts (write-locked them). This yields a fee estimate tailored to the accounts your transaction will touch — useful when a specific account is contended. Omit addresses to get the global recent-fee picture across the cluster.

Parameters

getRecentPrioritizationFees parameters
NameTypeRequiredDescription
addressesarrayNo

Returns

getRecentPrioritizationFees return value
FieldType
resultarray

Examples

curl https://triport.io/sol \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"getRecentPrioritizationFees","params":["<addresses>"],"jsonrpc":"2.0"}'
const res = await fetch("https://triport.io/sol", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "id": 1,
  "method": "getRecentPrioritizationFees",
  "params": [
    "<addresses>"
  ],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/sol",
    headers={"Authorization": "Bearer <api-key>"},
    json={"id":1,"method":"getRecentPrioritizationFees","params":["<addresses>"],"jsonrpc":"2.0"},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet, devnet, testnet.
  3. Credit cost: 1 per call.

FAQ

What does getRecentPrioritizationFees do?
Returns the per-block prioritization fees paid over the most recent blocks, for estimating the priority fee to attach before sending a transaction.
How many credits does getRecentPrioritizationFees cost?
getRecentPrioritizationFees costs 1 credit(s) per call on Triport by default.
Is getRecentPrioritizationFees available over WebSocket?
getRecentPrioritizationFees is an HTTP JSON-RPC method.