getFees - Solana
getFees. Provides developers with the latest fee structure information
getFees - solana [Value: 10CU]
Provides with the latest fee structure information
Use cases
- Obtain current network fees for Solana transactions
- Compare transaction fees over different time periods
- Estimate transaction costs for budget planning
Constraints
- Data limited to current network fees
- API rate limits might apply to requests
- Potential delays in fetching fee information
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://solana.drpc.org \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1, "method":"getFees"}'
Response
200
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 98108954
},
"value": {
"blockhash": "6EUDAG2UBZ1J7CbpixutsELc5c6s4k8YzaWawyKH2Pit",
"feeCalculator": {
"lamportsPerSignature": 5000
},
"lastValidBlockHeight": 98109000
}
},
"id": 1
}
Request params
idinteger
jsonrpcstring
methodstring
array
commitmentstring
The level of commitment required for the query
- finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
- confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
- processed - The node will query its most recent block. Note that the block may not be complete
Response
200
Contains details about the cluster fee rate at the queried blockhashResponse params
object
idinteger
jsonrpcstring
resultstring
object
valueobject
A JSON object describing the cluster fee rate at the queried blockhash.
object
blockhashstring
The blockhash used for the specified transaction, which is utilized in calculating the fees.
feeCalculatorobject
Represents the fee calculator for the specified transaction, including:
object
lamportsPerSignatureinteger
The number of lamports required per signature in the transaction.
lastValidBlockHeightinteger
The last block height where the blockhash is valid.
lastValidSlotinteger
The last valid slot for the specified transaction.
contextobject
object
apiVersionstring
The Solana RPC API version being used.
slotinteger
The slot number corresponding to the fee calculator information.