getMinimumBalanceForRentExemption
Returns minimum balance required to make account rent exempt.

Parameters

  • <usize> - account data length
  • <object> - (optional)
    • commitment: (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.

Returns

  • <u64> - minimum lamports required in account

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo/' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jsonrpc": "2.0",
5
"id": 1,
6
"method": "getMinimumBalanceForRentExemption",
7
"params": [
8
50
9
]
10
}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": 1238880,
4
"id": 1
5
}
Copied!