Skip to main content

Parameters

number
The length of the account data in bytes
object

Response

number
The minimum balance required for rent exemption in lamports

Code Examples

Basic Request

Using web3.js

Notes

  1. Returns the minimum balance required for an account to be rent exempt
  2. The balance is returned in lamports
  3. The required balance depends on the account’s data length
  4. The response is immediate as it reads from the current state
  5. This value can change with network upgrades

Best Practices

  1. Use this method to determine account creation costs
  2. Cache results when appropriate to reduce RPC load
  3. Consider the impact of data length on costs
  4. Monitor for changes in rent exemption requirements
  5. Use in conjunction with other account-related methods

Common Errors

Use Cases

  1. Account Cost Analysis
  2. Balance Monitoring
  3. Account Planning