Skip to main content

getFeeForMessage RPC Method

Loading...

Updated on
Apr 30, 2025

getFeeForMessage RPC Method

Please note that this method is only available in solana-core v1.9 or newer. Please use getFees for solana-core v1.8

Parameters

message
string
REQUIRED
Loading...
object
object
Loading...
commitment
string
Loading...
finalized
string
Loading...
confirmed
string
Loading...
processed
string
Loading...
maxSupportedTransactionVersion
number
Loading...

Returns

result
Loading...
context
Loading...
apiVersion
Loading...
slot
Loading...
value
Loading...
Request
1
curl https://docs-demo.solana-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '
5
{
6
"id":1,
7
"jsonrpc":"2.0",
8
"method":"getFeeForMessage",
9
"params":[
10
"AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
11
{
12
"commitment":"processed"
13
}
14
]
15
}
16
'
1
curl https://docs-demo.solana-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '
5
{
6
"id":1,
7
"jsonrpc":"2.0",
8
"method":"getFeeForMessage",
9
"params":[
10
"AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
11
{
12
"commitment":"processed"
13
}
14
]
15
}
16
'
Response
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"context": {
5
"apiVersion": "2.1.21",
6
"slot": 335501818
7
},
8
"value": null
9
},
10
"id": 1
11
}
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"context": {
5
"apiVersion": "2.1.21",
6
"slot": 335501818
7
},
8
"value": null
9
},
10
"id": 1
11
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free