Parameters

addresses
array

An array of account addresses (as base-58 encoded strings). If provided, the response will be filtered to only include prioritization fees paid by one of the addresses.

Response

result
array

Code Examples

Basic Request

curl http://rpc.orbitflare.com -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPrioritizationFees",
  "params": [
    ["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"]
  ]
}'

Using web3.js

import { Connection } from '@solana/web3.js';

const connection = new Connection('http://rpc.orbitflare.com');
const address = 'CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY';
const fees = await connection.getRecentPrioritizationFees([address]);
console.log(fees);

Using Python

from solana.rpc.api import Client

client = Client("http://rpc.orbitflare.com")
address = "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"
response = client.get_recent_prioritization_fees([address])
print(response)

Notes

  1. Returns a list of recent prioritization fees from blocks
  2. Useful for estimating fees for priority transactions
  3. Fees are reported in micro-lamports (LAMPORTS_PER_SOL/1000000)
  4. If addresses parameter is provided, results are filtered to those accounts
  5. The response can be used to calculate appropriate prioritization fees

Best Practices

  1. Use this method to determine appropriate priority fees during network congestion
  2. Filter by specific addresses if you only care about fees paid by certain accounts
  3. Calculate an appropriate fee based on average or percentile of recent fees
  4. Refresh fee data frequently during high network activity
  5. Handle network errors and retry when appropriate