> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/solana/rpc-methods/sending-transactions/getrecentprioritizationfees.md).

# getRecentPrioritizationFees

Returns recent per-slot prioritization fees in micro-lamports per compute unit, optionally for writable accounts; Triton adds a percentile parameter.

## Request

{% tabs %}
{% tab title="cURL" %}

```bash
curl "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>" -s -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPrioritizationFees",
  "params": [
    ["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"]
  ]
}'
```

{% endtab %}

{% tab title="Kit" %}

```typescript
import { address, createSolanaRpc } from "@solana/kit";

const rpc_url = "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>";
const rpc = createSolanaRpc(rpc_url);

let addresses = [address("CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY")];
let prioritizationFees = await rpc
  .getRecentPrioritizationFees(addresses)
  .send();

console.log(prioritizationFees);
```

{% endtab %}

{% tab title="web3.js" %}

```typescript
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>", "confirmed");

let addresses = [new PublicKey("CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY")];

let prioritizationFees = await connection.getRecentPrioritizationFees({
  lockedWritableAccounts: addresses
});

console.log(prioritizationFees);
```

{% endtab %}

{% tab title="Rust" %}

```rust
// Cargo.toml: anyhow = "1", solana-client = "~4.4", solana-commitment-config = "3",
// solana-sdk = "5", tokio = { version = "1", features = ["full"] }. solana-client 4.4 takes
// solana-sdk 5.x types. Requires Rust 1.98.1 or newer (solana-client 4.4).
use anyhow::Result;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_commitment_config::CommitmentConfig;
use solana_sdk::pubkey;

#[tokio::main]
async fn main() -> Result<()> {
    let client = RpcClient::new_with_commitment(
        String::from("https://<your-endpoint>.mainnet.rpcpool.com/<your-token>"),
        CommitmentConfig::confirmed(),
    );

    let addresses = [pubkey!("CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY")];
    let prioritization_fees = client.get_recent_prioritization_fees(&addresses).await?;

    println!("{:#?}", prioritization_fees);

    Ok(())
}
```

{% endtab %}
{% endtabs %}

## Parameters

**`addresses`** · array · optional

Optional array of account addresses, as base-58 encoded strings. Maximum 128 addresses.

{% hint style="info" %}
If you provide this parameter, the response reflects a fee to land a transaction that locks all of the supplied accounts as writable.
{% endhint %}

If you omit `params` entirely, the RPC returns recent prioritization-fee samples without filtering by writable account locks.

## Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "slot": 348125,
      "prioritizationFee": 0
    },
    {
      "slot": 348126,
      "prioritizationFee": 1000
    },
    {
      "slot": 348127,
      "prioritizationFee": 500
    },
    {
      "slot": 348128,
      "prioritizationFee": 0
    },
    {
      "slot": 348129,
      "prioritizationFee": 1234
    }
  ],
  "id": 1
}
```

## Result

Array of prioritization-fee samples containing:

**`slot`** · u64

Slot that produced this fee sample.

**`prioritizationFee`** · u64

Prioritization fee, in micro-lamports per compute unit, observed for that slot.

## Triton percentile extension

Solana's `getRecentPrioritizationFees` returns only the *minimum* fee paid in recent blocks, which is often zero. Triton adds a `percentile` parameter so you can request a realistic market rate.

`percentile` is an integer from 1 to 10000 (0.01% to 100.00%). Common choices: `5000` is the 50th percentile (median), `9000` the 90th, and `9500` the 95th for landing under heavy congestion. The response shape is unchanged: `prioritizationFee` reflects the requested percentile instead of the minimum. Omit it for the standard behaviour.

```bash
curl "https://<your-endpoint>.mainnet.rpcpool.com/<your-token>" -s -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getRecentPrioritizationFees",
    "params": [
      ["RNXnAJV1DeBt6Lytjz4wYzvS3d6bhsfidS5Np4ovwZz"],
      { "percentile": 5000 }
    ]
  }'
```

With `percentile` the fees reflect real market rates rather than minimums (truncated example):

```json
{
  "jsonrpc": "2.0",
  "result": [
    { "slot": 430532356, "prioritizationFee": 3000 },
    { "slot": 430532357, "prioritizationFee": 3558 },
    { "slot": 430532358, "prioritizationFee": 2499 }
  ],
  "id": 1
}
```

***

*Adapted from the* [*Solana `getRecentPrioritizationFees` reference*](https://solana.com/docs/rpc/http/getrecentprioritizationfees)*, maintained by the Solana Foundation.*

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
