getFeeForMessage
Solana node API
getFeeForMessage | Solana
The Solana getFeeForMessage method returns the fee in lamports that the cluster will charge to process the given message. On Solana.
POST
getFeeForMessage
Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
Solana getFeeForMessage method
The Solana getFeeForMessage method returns the fee in lamports that the cluster will charge to process the given message.
This method provides the cost of processing a message based on the current fee schedule. It is useful for estimating the cost of a transaction before it is submitted to the network.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
message— the message to calculate the fee for.
Response
value— the fee in lamports that the cluster will charge to process the message.
Use case
A practical use case forgetFeeForMessage is to estimate the cost of a transaction before it is submitted to the network. This can be useful for wallets or other applications that need to display or make use of this information.
Here’s a script to generate the message data for the 1 SOL transfer:
Last modified on May 18, 2026