For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Solana — Methods (4/4)

API reference for Solana. All methods ->

Part 4 of 4: 1 · 2 · 3 · 4

getMaxShredInsertSlot

Returns the max slot seen from after shred insert.

Parameters


  • id (integer; required): a request ID (example: 1).
  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).
  • method (string; required): a method used for the request.
  • params (array; required): None.

Returns


  • <u64>: the slot.

Request example

curl -X POST https://rpc.ankr.com/solana/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "getMaxShredInsertSlot",
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": 374443465,
"id": 1
}

getMinimumBalanceForRentExemption

Returns minimum balance required to make account rent exempt.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • <usize>: the account data length.
    • <object> (optional): the configuration object containing the following field:
      • commitment (string): the commitment describes how finalized a block is at that point in time. When querying the ledger state, it's recommended to use lower levels of commitment to report progress and higher levels to ensure the state will not be rolled back. For processing many dependent transactions in series, it's recommended to use "confirmed" commitment, which balances speed with rollback safety. For total safety, it's recommended to use "finalized" commitment:
        • 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.
          • it incorporates votes from gossip and replay.
          • it does not count votes on descendants of a block, only direct votes on that block.
          • this confirmation level also upholds "optimistic confirmation" guarantees in release 1.3 and onwards.
        • processed: the node will query its most recent block. Note that the block may still be skipped by the cluster.

Returns


  • <u64>: the minimum lamports required in an account.

Request example

curl -X POST https://rpc.ankr.com/solana/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "getMinimumBalanceForRentExemption",
"params": [50],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": 1238880,
"id": 1
}