Fees, Inflation, and More
getFeeForMessage
POST - JSON-RPC
Returns the fee the network will charge for a particular message.
stringrequiredBase-64 encoded serialized message.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getFeeForMessage","params":["AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",{"commitment":"processed"}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getFeeForMessage",
"params": [
"AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
{ "commitment": "processed" }
]
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 5068 },
"value": 5000
},
"id": 1
}getMinimumBalanceForRentExemption
POST - JSON-RPC
Returns the minimum balance required for an account to be rent-exempt.
integerAccount data length in bytes (usize).
objectConfiguration object with optional commitment.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getMinimumBalanceForRentExemption","params":[50]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getMinimumBalanceForRentExemption",
"params": [50]
}{
"jsonrpc": "2.0",
"result": 500,
"id": 1
}getRecentPrioritizationFees
POST - JSON-RPC
Returns a list of prioritization fees from recent blocks.
arrayOptional array of account addresses as base-58 strings (max 128). If provided, results reflect fees for transactions involving these accounts.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getRecentPrioritizationFees","params":[["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwg97uo1UBTobi"]]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getRecentPrioritizationFees",
"params": [
["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwg97uo1UBTobi"]
]
}{
"jsonrpc": "2.0",
"result": [
{
"slot": 348125,
"prioritizationFee": 0
},
{
"slot": 348126,
"prioritizationFee": 1000
}
],
"id": 1
}result[]arrayproperties
slotintegerprioritizationFeeintegergetSupply
POST - JSON-RPC
Returns information about the current supply, including total, circulating, and non-circulating supply.
objectConfiguration object:
commitment(string) - commitment levelexcludeNonCirculatingAccountsList(boolean) - exclude account list from response
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getSupply"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getSupply"
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 1114 },
"value": {
"circulating": 16000,
"nonCirculating": 1000000,
"nonCirculatingAccounts": [],
"total": 1016000
}
},
"id": 1
}getLargestAccounts
POST - JSON-RPC
Returns the 20 largest accounts by lamport balance.
objectConfiguration object:
commitment(string) - commitment levelfilter(string) -circulatingornonCirculating
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getLargestAccounts"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getLargestAccounts"
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 54 },
"value": [
{
"address": "95L1KxpuB82F16wBiL5WAb6KLPEh5FE3Sbt1kWGSSQQM",
"lamports": 499999999999999940
}
]
},
"id": 1
}getInflationGovernor
POST - JSON-RPC
Returns the current inflation governor.
objectConfiguration object with optional commitment.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getInflationGovernor"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getInflationGovernor"
}{
"jsonrpc": "2.0",
"result": {
"foundation": 0.05,
"foundationTerm": 7,
"initial": 0.15,
"taper": 0.15,
"terminal": 0.015
},
"id": 1
}resultobjectproperties
initialnumberterminalnumbertapernumberfoundationnumberfoundationTermnumbergetInflationRate
POST - JSON-RPC
Returns the specific inflation values for the current epoch.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getInflationRate"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getInflationRate"
}{
"jsonrpc": "2.0",
"result": {
"epoch": 100,
"foundation": 0.001,
"total": 0.149,
"validator": 0.148
},
"id": 1
}getInflationReward
POST - JSON-RPC
Returns the inflation/staking reward for a list of addresses for a specific epoch.
arrayArray of account addresses as base-58 encoded strings.
objectConfiguration object:
commitment(string)epoch(integer) - specific epoch (defaults to current)minContextSlot(integer)
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getInflationReward","params":[["6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu"],{"epoch":2}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getInflationReward",
"params": [
["6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu"],
{ "epoch": 2 }
]
}{
"jsonrpc": "2.0",
"result": [
{
"amount": 2500,
"commission": null,
"effectiveSlot": 432000,
"epoch": 2,
"postBalance": 499999442500
}
],
"id": 1
}getStakeMinimumDelegation
POST - JSON-RPC
Returns the stake minimum delegation amount in lamports.
objectConfiguration object with optional commitment.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getStakeMinimumDelegation"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getStakeMinimumDelegation"
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 501 },
"value": 1000000000
},
"id": 1
}isBlockhashValid
POST - JSON-RPC
Returns whether a blockhash is still valid or not.
stringrequiredBlockhash as a base-58 encoded string.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"isBlockhashValid","params":["J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",{"commitment":"processed"}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "isBlockhashValid",
"params": [
"J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",
{ "commitment": "processed" }
]
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 2483 },
"value": false
},
"id": 1
}getLatestBlockhash
POST - JSON-RPC
Returns the latest blockhash.
objectConfiguration object with optional commitment and minContextSlot.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getLatestBlockhash","params":[{"commitment":"processed"}]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getLatestBlockhash",
"params": [{ "commitment": "processed" }]
}{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 2792 },
"value": {
"blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N",
"lastValidBlockHeight": 3090
}
},
"id": 1
}getGenesisHash
POST - JSON-RPC
Returns the genesis hash.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getGenesisHash"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getGenesisHash"
}{
"jsonrpc": "2.0",
"result": "GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC",
"id": 1
}getHighestSnapshotSlot
POST - JSON-RPC
Returns the highest slot information that the node has snapshots for.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getHighestSnapshotSlot"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getHighestSnapshotSlot"
}{
"jsonrpc": "2.0",
"result": {
"full": 100,
"incremental": 110
},
"id": 1
}getFirstAvailableBlock
POST - JSON-RPC
Returns the slot of the lowest confirmed block that has not been purged from the ledger.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getFirstAvailableBlock"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getFirstAvailableBlock"
}{
"jsonrpc": "2.0",
"result": 250000,
"id": 1
}getMaxRetransmitSlot
POST - JSON-RPC
Returns the maximum slot seen from the retransmit stage.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getMaxRetransmitSlot"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getMaxRetransmitSlot"
}{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}getMaxShredInsertSlot
POST - JSON-RPC
Returns the maximum slot seen after the shred insert stage.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"getMaxShredInsertSlot"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "getMaxShredInsertSlot"
}{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}minimumLedgerSlot
POST - JSON-RPC
Returns the lowest slot that the node has information about in its ledger.
Parameters: None
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"minimumLedgerSlot"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "minimumLedgerSlot"
}{
"jsonrpc": "2.0",
"result": 1234,
"id": 1
}requestAirdrop
POST - JSON-RPC
Requests an airdrop of lamports to a Pubkey.
stringrequiredPubkey as a base-58 encoded string.
integerrequiredLamports to airdrop.
objectConfiguration object with optional commitment.
curl https://api.mainnet-beta.solana.com \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"requestAirdrop","params":["83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo",1000000000]}'{
"jsonrpc": "2.0",
"id": 1,
"method": "requestAirdrop",
"params": [
"83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo",
1000000000
]
}{
"jsonrpc": "2.0",
"result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
"id": 1
}Airdrops are only available on devnet and testnet. Mainnet airdrop requests will fail.