solana-priority-fee

Solana priority fee estimator for JavaScript

The compute unit price recent Solana blocks landed at, scoped to the pool or bonding curve your transaction writes to, as percentiles and levels, plus the Compute Budget instruction bytes to pay it. Any RPC. Zero dependencies.

View on GitHubStart trading at blixvip.comJoin the Discord

Try it

npx github:blixvip/solana-priority-fee 58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2

The account is the Raydium SOL-USDC pool, which every swap through it writes to. Real output from the public mainnet RPC on 2026-11-17:

150 slots (470718277-470718426), 1 account; 59.3% of slots had a non-zero fee

  percentile         micro-lamports/CU
  min                               0
  p25                               0
  p50                           3,227
  p75                          10,000
  p90                          10,000
  p95                          10,000
  max                       1,000,000

  level              micro-lamports/CU   cost at 200,000 CU
  low (p25)                         0            0 lamports
  medium (p50)                  3,227          646 lamports
  high (p75)                   10,000        2,000 lamports
  veryHigh (p95)               10,000        2,000 lamports
  unsafeMax (p100)          1,000,000      200,000 lamports

  cost excludes the 5,000 lamport base fee per signature.

What it does

Use it in your code

npm install github:blixvip/solana-priority-fee
import { estimatePriorityFee, toInstructionsData, costLamports } from "solana-priority-fee";

const fee = await estimatePriorityFee({ accounts: ["58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"] });
fee.recommended.high;                        // p75, micro-lamports per CU
costLamports(fee.recommended.high, 200_000); // lamports on top of the base fee
toInstructionsData(fee.recommended.high, 200_000).instructions; // the two Compute Budget instructions

Ready-made integrations

Full documentation, the API and the limits are in the README. MIT licensed, no dependencies.

BLIX: AI-powered Solana memecoin terminal. Trade memes first.

Guides

From the team behind Blix

solana-priority-fee is a small, open piece of what runs behind Blix, the AI-powered Solana memecoin terminal with 0% fees: every pump.fun launch live, AI coin ratings, narratives, wallet and X tracking, and one-click trading. If you want the result rather than the plumbing, start trading at blixvip.com. There is also a public API and an MCP server for AI agents.

Contribute

Pull requests are welcome and there are good first issues with step-by-step instructions. Setup is git clone and npm test. Ideas and questions go in Discussions or the Discord.

More Solana tools from Blix

solana-readonly-mcpRead-only Solana MCP server for Claude, Cursor and AI agentssolana-rpc-poolA Solana RPC load balancer: several endpoints, rate limits, failoverpump-curveRead a pump.fun bonding curve: price, market cap, progress, migrationsol-holdersTop holders of any Solana token, grouped by wallet, pools left outsolana-ws-keepaliveSolana WebSocket subscriptions that reconnect on their own