fee
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. 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. Example: {} for network prices, or {"tx": ""} for your own. Cost: 25 free calls a day, then $0.01 USDC per call (x402). Outputs explained: GET /api/tools/fee.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fee"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx | No | 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 | No | Default "mainnet-beta" (real money). "devnet" only for test wallets. | mainnet-beta |