Fees, Inflation, and More

getFeeForMessage

POST - JSON-RPC

Returns the fee the network will charge for a particular message.

stringrequired

Base-64 encoded serialized message.

object

Configuration object with optional commitment and minContextSlot.

bash
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"}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFeeForMessage",
  "params": [
    "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
    { "commitment": "processed" }
  ]
}
json
{
  "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.

integer

Account data length in bytes (usize).

object

Configuration object with optional commitment.

bash
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]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMinimumBalanceForRentExemption",
  "params": [50]
}
json
{
  "jsonrpc": "2.0",
  "result": 500,
  "id": 1
}

getRecentPrioritizationFees

POST - JSON-RPC

Returns a list of prioritization fees from recent blocks.

array

Optional array of account addresses as base-58 strings (max 128). If provided, results reflect fees for transactions involving these accounts.

bash
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"]]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPrioritizationFees",
  "params": [
    ["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwg97uo1UBTobi"]
  ]
}
json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "slot": 348125,
      "prioritizationFee": 0
    },
    {
      "slot": 348126,
      "prioritizationFee": 1000
    }
  ],
  "id": 1
}
result[]array
properties
slotinteger
The slot this fee was observed in.
prioritizationFeeinteger
Fee in micro-lamports per compute unit.

getSupply

POST - JSON-RPC

Returns information about the current supply, including total, circulating, and non-circulating supply.

object

Configuration object:

  • commitment (string) - commitment level
  • excludeNonCirculatingAccountsList (boolean) - exclude account list from response
bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSupply"
}
json
{
  "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.

object

Configuration object:

  • commitment (string) - commitment level
  • filter (string) - circulating or nonCirculating
bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLargestAccounts"
}
json
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 54 },
    "value": [
      {
        "address": "95L1KxpuB82F16wBiL5WAb6KLPEh5FE3Sbt1kWGSSQQM",
        "lamports": 499999999999999940
      }
    ]
  },
  "id": 1
}

getInflationGovernor

POST - JSON-RPC

Returns the current inflation governor.

object

Configuration object with optional commitment.

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationGovernor"
}
json
{
  "jsonrpc": "2.0",
  "result": {
    "foundation": 0.05,
    "foundationTerm": 7,
    "initial": 0.15,
    "taper": 0.15,
    "terminal": 0.015
  },
  "id": 1
}
resultobject
properties
initialnumber
Initial inflation rate.
terminalnumber
Terminal inflation rate.
tapernumber
Annual taper rate.
foundationnumber
Foundation percentage of total inflation.
foundationTermnumber
Duration of foundation pool in years.

getInflationRate

POST - JSON-RPC

Returns the specific inflation values for the current epoch.

Parameters: None

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationRate"
}
json
{
  "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.

array

Array of account addresses as base-58 encoded strings.

object

Configuration object:

  • commitment (string)
  • epoch (integer) - specific epoch (defaults to current)
  • minContextSlot (integer)
bash
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}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationReward",
  "params": [
    ["6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu"],
    { "epoch": 2 }
  ]
}
json
{
  "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.

object

Configuration object with optional commitment.

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getStakeMinimumDelegation"
}
json
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 501 },
    "value": 1000000000
  },
  "id": 1
}

isBlockhashValid

POST - JSON-RPC

Returns whether a blockhash is still valid or not.

stringrequired

Blockhash as a base-58 encoded string.

object

Configuration object with optional commitment and minContextSlot.

bash
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"}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "isBlockhashValid",
  "params": [
    "J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",
    { "commitment": "processed" }
  ]
}
json
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 2483 },
    "value": false
  },
  "id": 1
}

getLatestBlockhash

POST - JSON-RPC

Returns the latest blockhash.

object

Configuration object with optional commitment and minContextSlot.

bash
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"}]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLatestBlockhash",
  "params": [{ "commitment": "processed" }]
}
json
{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 2792 },
    "value": {
      "blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N",
      "lastValidBlockHeight": 3090
    }
  },
  "id": 1
}

getGenesisHash

POST - JSON-RPC

Returns the genesis hash.

Parameters: None

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getGenesisHash"
}
json
{
  "jsonrpc": "2.0",
  "result": "GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC",
  "id": 1
}

getHighestSnapshotSlot

POST - JSON-RPC

Returns the highest slot information that the node has snapshots for.

Parameters: None

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHighestSnapshotSlot"
}
json
{
  "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

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFirstAvailableBlock"
}
json
{
  "jsonrpc": "2.0",
  "result": 250000,
  "id": 1
}

getMaxRetransmitSlot

POST - JSON-RPC

Returns the maximum slot seen from the retransmit stage.

Parameters: None

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMaxRetransmitSlot"
}
json
{
  "jsonrpc": "2.0",
  "result": 1234,
  "id": 1
}

getMaxShredInsertSlot

POST - JSON-RPC

Returns the maximum slot seen after the shred insert stage.

Parameters: None

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMaxShredInsertSlot"
}
json
{
  "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

bash
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"}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "minimumLedgerSlot"
}
json
{
  "jsonrpc": "2.0",
  "result": 1234,
  "id": 1
}

requestAirdrop

POST - JSON-RPC

Requests an airdrop of lamports to a Pubkey.

stringrequired

Pubkey as a base-58 encoded string.

integerrequired

Lamports to airdrop.

object

Configuration object with optional commitment.

bash
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]}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "requestAirdrop",
  "params": [
    "83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo",
    1000000000
  ]
}
json
{
  "jsonrpc": "2.0",
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
  "id": 1
}

Airdrops are only available on devnet and testnet. Mainnet airdrop requests will fail.