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
| Name | Type | Required | Description |
|---|---|---|---|
| addresses | array | No |
Returns
| Field | Type |
|---|---|
| result | array |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getRecentPrioritizationFees","params":["<addresses>"]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "getRecentPrioritizationFees",
"params": [
"<addresses>"
],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"getRecentPrioritizationFees","params":["<addresses>"],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet, devnet, testnet.
- 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.