getFeeForMessage RPC Method
Get the fee the network will charge for a particular Message
params
string
required
Base-64 encoded Message.object
optional
Configuration object.commitment
The commitment describes how finalized a block is at that point in time. See Configuring State Commitment.
minContextSlot
The minimum slot that the request can be evaluated at.
result
u64 | null
Fee corresponding to the message at the specified blockhash
cURL
curl https://us-seattle.openverse.network/api -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getFeeForMessage",
"params": [
"AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
{
"commitment": "processed"
}
]
}
'
Response
{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 5068 },
"value": 5000
},
"id": 1
}