Actions22
- Call Contract
- Estimate Gas
- Get Balance
- Get Block
- Get Block By Hash
- Get Block Number
- Get Block Transaction Count By Hash
- Get Block Transaction Count By Number
- Get Code
- Get Gas Price
- Get Logs
- Get Storage At
- Get Transaction
- Get Transaction By Block Hash And Index
- Get Transaction By Block Number And Index
- Get Transaction Count
- Get Transaction Receipt
- Get Uncle By Block Hash And Index
- Get Uncle By Block Number And Index
- Get Uncle Count By Block Hash
- Get Uncle Count By Block Number
- Send Raw Transaction
Get Balance
AI-generatedOverview
This node interacts with the Infura blockchain API to retrieve the ETH balance of a specified Ethereum address. It is useful for scenarios where you need to check the current balance of an address on the Ethereum network, such as monitoring wallet balances or verifying funds before transactions.
Use Case Examples
- Checking the ETH balance of a user's wallet address before processing a payment.
- Monitoring the balance of a smart contract address to ensure it has sufficient funds.
Properties
| Name | Meaning |
|---|---|
| Address | The Ethereum address for which to retrieve the ETH balance. |
Output
JSON
address- The Ethereum address queried for balance.balanceWei- The balance in Wei (smallest ETH unit) as a hexadecimal string.balanceEth- The balance converted to Ether (ETH) as a decimal number.metadatanetwork- The Ethereum network used (e.g., mainnet, rinkeby).operation- The operation performed, here 'getBalance'.timestamp- Timestamp of when the operation was performed.infura_endpoint- The Infura API endpoint used for the request.raw_response- The raw response data from the Infura API.
Dependencies
- Infura API credentials including network, projectId, and optionally projectSecret for authentication.
Troubleshooting
- Common issues include invalid or missing Ethereum address input, which will cause the API call to fail.
- Errors related to Infura API credentials such as incorrect project ID or network configuration can cause authentication failures.
- If the node throws an error about invalid JSON or response, verify the network connectivity and Infura service status.
Links
- Infura eth_getBalance API Documentation - Official documentation for the eth_getBalance JSON-RPC method used by the node.