Network/fee

What fee to pay

$0.01per call after 25 free a day

Turns what recent transactions paid for priority into three prices: cheap, normal, fast. Pass your transaction to get its compute limit and exact cost at each.

Run before setting a priority fee. Gives the price in the unit Compute Budget expects (micro-lamports per compute unit) and the total in SOL, so a unit mix-up never overpays.

Saves money. Prices are in micro-lamports per compute unit, the unit setComputeUnitPrice takes. Mixing that up with lamports overpays a million times.

Call it

TransportHow
HTTPPOST /api/tools/fee with a JSON body of the inputs below.
MCPtools/call with name fee on /mcp.

Inputs

NameWhat it's looking forWhere to get it
tx
string (base64), optional
Your transaction, so fees match its accounts and compute comes from a dry run.Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx.
network
"mainnet-beta" | "devnet", optional
Default "mainnet-beta" (real money)."devnet" only for test wallets.

Returned fields

Every field the tool returns, what it is, and exactly how it's worked out.

FieldWhat it isHow it's worked out
unit
string
Always "micro-lamports per compute unit". 1,000,000 micro-lamports = 1 lamport. It is the unit setComputeUnitPrice takes.Fixed.
based_on
string
What the prices come from: the transactions in the latest blocks, plus your transaction's writable accounts when given.The blocks read (slots listed); with a transaction, also getRecentPrioritizationFees on its writable accounts.
samples / share_paying
number
How many recent transactions were sampled, and the share of them that paid any priority fee.Every non-vote transaction in the latest 2 readable blocks (getBlock, version 1 included).
prices.cheap / normal / fast .compute_unit_price
number
The price to set with setComputeUnitPrice. cheap is what half of recent transactions paid or more; fast is for urgent trades.The 50th, 75th and 90th percentile of what those transactions paid per compute unit (a v1 transaction's lamport total over its compute limit). With a transaction, each is raised to the same percentile of the lowest fees that landed on its accounts, if that is higher.
prices.*.priority_lamports / total_lamports / total_sol
string
What the transaction would pay at that price.priority = price x compute units / 1,000,000, rounded up. total = priority + 5000 lamports per signature.
compute_units
number
The compute units the costs are worked out for.With a transaction: dry-run units used + 10%. Without: 200,000 (a typical one-step default).
compute_units_from
string
Whether compute_units came from a dry run or the default."simulation" or "default".
how_to_use
string
The two Compute Budget steps to add (for a v1 transaction, the two config fields to set).Built from the normal price and compute_units.