RPC MethodsHTTPgetFeeForMessage

Transaction

getFeeForMessage

Get the fee the network will charge for a particular message.

Parameters

messagestring required

Base-64 encoded message.

configobject optional

Configuration object.

commitmentstring

Commitment level.

minContextSlotnumber

The minimum slot.

Result

u64 | null

Fee corresponding to the message at the specified blockhash.

Example

Request
JSON
curl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFeeForMessage",
  "params": [
    "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
    { "commitment": "finalized" }
  ]
}'
Response
JSON
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 5068
},
"value": 5000
},
"id": 1
}