TriportRPC

getPriorityFeeEstimate

POSThttps://api.triport.io

Returns a recommended priority (compute-unit) fee estimate for landing a Solana transaction.

Solanasol_read_rpcfree+ — free 20 / basic 60 / pro 200 / business 600 RPS

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. 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

In the current scaffold the spec declares no parameters (params is an empty array []), so the request below sends "params": []. The finalized api.2.2+ schema is expected to accept an optional options object identifying the transaction (e.g. the accounts it touches, or a serialized transaction) and a target priority level. Treat the table below as preliminary — it documents the intended shape, not a guaranteed contract.

options *(pending)*objectoptional
Reserved. Final fields are defined by spec api.2.2+; until then send no parameters.

Response

The result is a JSON object. The current scaffold types it as an open object (type: object, additional properties allowed); the field names below illustrate the intended shape and are pending finalization in api.2.2+.

resultobject
Fee-estimate envelope. Currently an open object; concrete fields are pending api.2.2+.
result.priorityFeeEstimate *(pending)*number
Recommended priority fee in micro-lamports per compute unit. Field name/shape may change when the schema is finalized.

Errors

Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and the error.data fields.

CodeMeaningWhen it happens
-32003Rate limit exceededMore than your tier's RPS for sol_read_rpc (free 20 / basic 60 / pro 200 / business 600); a burst up to 2× is allowed before throttling.
-32601Method not recognisedThe method name was misspelled or is not in the Solana catalog.
-32602Invalid paramsParameters were sent that the (pending) schema does not accept.
401UnauthorizedMissing or invalid Authorization: Bearer key.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getPriorityFeeEstimate",
    params: [],
  }),
});


const { result } = await res.json();
console.log(`Suggested priority fee: ${result.priorityFeeEstimate} µ-lamports/CU`);

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });


// Result shape is pending spec api.2.2+ — typed loosely until then.
const estimate = await client.solana.getPriorityFeeEstimate();
console.log(`Suggested priority fee: ${estimate.priorityFeeEstimate} µ-lamports/CU`);

Python (triport-sdk)

import os
from triport import TriportClient


client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])


# Result shape is pending spec api.2.2+.
estimate = client.solana.get_priority_fee_estimate()
print(f"Suggested priority fee: {estimate['priorityFeeEstimate']} micro-lamports/CU")

Notes

  • Scaffold method: the request and response details above are provisional and finalized by spec api.2.2/2.3/2.4. Re-check this page once your target spec version ships before depending on specific fields.
  • Micro-lamports per compute unit: priority fees are priced per CU. Multiply the estimate by your transaction's compute-unit limit to size the total priority cost, then set it with ComputeBudgetProgram.setComputeUnitPrice.
  • Fetch fresh, don't cache: the recommendation tracks recent demand and moves slot to slot; request a new estimate per submission.
  • Related methods: apply the estimate, then submit with sendTransaction. For the base (non-priority) fee of a specific message, see getFeeForMessage.
  • Staging: the same request works against https://staging.api.triport.io for testing.