getFeeForMessage

All the specifications for getFeeForMessage RPC Method on Solana

Get the fee the network will charge for a particular message

Parameters required for this RPC call

  • message: A Base-64 encoded message, for which we are getting the fees.

  • minContextSlot: The minimum slot that the request can be evaluated at.

  • configuration : This contains the following parameters, all are optional fields.

    • commitment: The commitment describes how finalized a block is at that point in time. Only confirmed and finalized are supported, defaults to finalized.

    • encoding: Encoding format for each returned transaction. The supported options are json, jsonParsed, base58 and base64. You can know more about Parsed responses more on Solana docs.

curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
  POST -H "Content-Type: application/json" -d ' 
   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "getFeeForMessage",
     "params": [
       "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
       {
         "commitment": "processed"
       }
     ]
   }
 '

Last updated

Was this helpful?