POSTgetFeeForMessage

Get the fee the network will charge for a particular Message

Request Body
jsonrpcstringrequired
idintegerrequired
methodstringrequired
paramsoneOf[]required
params[0]string

Base-64 encoded Message

Responses
idinteger

The request ID

jsonrpcstring

The JSON-RPC version

contextobject

An object containing metadata about the current state of the Solana network at the time of the request.

apiVersionstring

The API version used for the request

slotinteger

The slot number at which the request was evaluated

valueinteger (uint64)

Fee corresponding to the message at the specified blockhash

X-API-KEY
RequestCU20
cURL
curl -X POST "https://solana-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFeeForMessage",
  "params": [
    "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
    {
      "commitment": "processed"
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "apiVersion": "2.3.6",
      "slot": 5068
    },
    "value": 5000
  },
  "id": 1
}