Skip to main content
Glama

helius_get_priority_fee_estimate

Estimate transaction priority fees on Solana to optimize confirmation speed and cost, using Helius API data for accurate fee calculations.

Instructions

Get priority fee estimate for a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountKeysNo
optionsNo

Implementation Reference

  • The handler function implementing the tool logic. It calls the Helius RPC getPriorityFeeEstimate method with the provided accountKeys and options, then formats the response.
    export const getPriorityFeeEstimateHandler = async (input: GetPriorityFeeEstimateInput): Promise<ToolResultSchema> => { try { // This function has parameter type mismatches const result = await (helius as any as Helius).rpc.getPriorityFeeEstimate({ accountKeys: input.accountKeys, options: { priorityLevel: input.options?.priorityLevel as PriorityLevel, includeAllPriorityFeeLevels: input.options?.includeAllPriorityFeeLevels } }); return createSuccessResponse(`Priority fee estimate: ${JSON.stringify(result.priorityFeeEstimate, null, 2)} priorityFeeLevels: ${JSON.stringify(result.priorityFeeLevels ?? [], null, 2)} `); } catch (error) { return createErrorResponse(`Error getting priority fee estimate: ${error instanceof Error ? error.message : String(error)}`); } }
  • The input schema defining the parameters for the tool: accountKeys (array of strings) and optional options (priorityLevel and includeAllPriorityFeeLevels).
    { name: 'helius_get_priority_fee_estimate', description: 'Get priority fee estimate for a transaction', inputSchema: { type: 'object', properties: { accountKeys: { type: 'array', items: { type: 'string' } }, options: { type: 'object', properties: { priorityLevel: { type: 'string', enum: ['default', 'high', 'max'] }, includeAllPriorityFeeLevels: { type: 'boolean' } } } } } },
  • src/tools.ts:585-585 (registration)
    Maps the tool name to its handler function in the central handlers dictionary.
    "helius_get_priority_fee_estimate": helius.getPriorityFeeEstimateHandler,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dcSpark/mcp-server-helius'

If you have feedback or need assistance with the MCP directory API, please join our Discord server