🔗getBalance
Description
The getBalance
function takes a blockchain network name and an account address as inputs and returns the balance of that account in the specified cryptocurrency
Parameters
Parameter | Type | Description |
---|---|---|
| string | Takes a string parameter specifying the name of the blockchain network (For eg. bsc, polygon, eth, ava, gnosis, moonbeam) |
| string | The address for which to retrieve the balance |
Response
Property | Type | Description |
---|---|---|
| BigNumber | Returns the current ether balance of the specified address on the specified blockchain network blockchain. |
Example Request and Response
Prerequisites
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Request
Here is an example of how to make a getBalance
request using the Nest SDK:
Response
Use Cases
Wallet Balance: The function can be used to get the balance of a wallet address for a specific blockchain network, helping users to keep track of their crypto assets.
Payment Systems: Payment systems can use the function to verify the balance of a user's account before processing transactions, ensuring that the user has sufficient funds to complete the payment.
Last updated