X

Priority Fee API

Integrate real-time fee estimation into your Solana application

Solana Priority Fee API | Smart Fee Estimation for Developers

Introduction

The Solana Priority Fee API provides developers with smart, real-time fee estimates based on live network activity. With six priority levels and per-program fee analysis, you can integrate accurate fee recommendations directly into your dApp or trading bot.

Primary Method

The primary API method analyzes your exact serialized transaction for maximum accuracy. Pass your transaction bytes with a priorityLevel parameter (Min, Low, Medium, High, VeryHigh, UnsafeMax) and receive the recommended micro-lamport price to use as your compute unit price.

Account-Based Method

For pre-transaction analysis or batch operations, use the account-based estimation method. Pass the list of accounts your transaction will interact with to get fee estimates based on recent activity for those specific program accounts — ideal for building fee prediction UIs.

The Priority Fee API exposes the getPriorityFeeEstimate method. Example request:

POST https://mainnet-rpc-endpoint
{
  "jsonrpc": "2.0",
  "method": "getPriorityFeeEstimate",
  "params": [{
    "transaction": "<serialized_tx_base58>",
    "options": {
      "priorityLevel": "Medium",
      "recommended": true
    }
  }]
}

Response includes priorityFeeEstimate in microlamports — pass this directly to ComputeBudgetProgram.setComputeUnitPrice(). Available priority levels: Min, Low, Medium, High, VeryHigh, UnsafeMax.

Related Resources

api endpoints

01
getPriorityFeeEstimate
02
Transaction-Based Analysis
03
Account-Based Estimation
04
Batch Fee Optimization
Developer-First Fee Estimation
6
Priority Levels
1
API Call to Estimate
JSON
Response Format

user feedback

Priority Fees Solana

Thomas H.

Solana user

The Priority Fee API removed all the guesswork from our fee strategy. One API call and we always send the right amount — never under, never over.

Priority Fees Solana

Sofia G.

Solana user

We integrated the fee API into our NFT minting platform and our users now see dramatically higher success rates during competitive drops.