Returns the lamports the cluster would charge to process a serialized message at the requested commitment.
Source
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getFeeForMessage",> "params": [> "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",> {> "commitment": "processed"> }> ]> }> '
params
stringrequired
Base-64 encoded transaction message. Accepts both legacy and v0 (versioned) message formats.
objectoptional
Configuration object.
result
Response
{"jsonrpc": "2.0","result": {"context": { "apiVersion": "3.1.8", "slot": 5068 },"value": 5000},"id": 1}
object
RpcResponse object containing:
Is this page helpful?