TriportRPC

getPriorityFeeEstimate

Last updated:

`getPriorityFeeEstimate` returns a **recommended priority fee** — the per-compute-unit price (in micro-lamports) that a transaction should attach so that it lands reliably given recent network conditions. Solana orders pending transactions in part by the priority fee they bid, so a sender uses this estimate to set a `ComputeBudgetProgram.setComputeUnitPrice` instruction before signing.

Use it just before submitting a transaction: query the estimate, apply it to the compute-budget instruction, then send via [`sendTransaction`](./sendTransaction.md). Because network demand shifts from slot to slot, fetch a fresh estimate per submission rather than caching one.

This is a read method in the `sol_read_rpc` category (free tier and up). It does not submit or simulate anything — it only reports a fee recommendation.

Parameters

This method takes no parameters.

Returns

getPriorityFeeEstimate return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"getPriorityFeeEstimate","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "getPriorityFeeEstimate",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"getPriorityFeeEstimate","params":[],"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 getPriorityFeeEstimate do?
Returns a recommended priority (compute-unit) fee estimate for landing a Solana transaction.
How many credits does getPriorityFeeEstimate cost?
getPriorityFeeEstimate costs 1 credit(s) per call on Triport by default.
Is getPriorityFeeEstimate available over WebSocket?
getPriorityFeeEstimate is an HTTP JSON-RPC method.