getBalanceByAddress

Fetch the native balance of a wallet.

This function returns all the wallets for the specified user (bearer token)

venlyConnect.api.getBalanceByAddress("MATIC", "0xA5dC4fb59eBCaf00100C00776b45c3E4b58c6B95");

Signature:

venlyConnect.api.getBalanceByAddress(secretType: SecretType, walletAddress: string): Promise<WalletBalance>

Returns:

Promise<WalletBalance>

Parameters:

ParameterRequiredDescription
secretTypeTrueParameter to indicate on which chain the token balance should be fetched
walletAddressTrueThe address of the wallet to fetch balance for

Example:

venlyConnect.api.getBalanceByAddress("MATIC", "0xA5dC4fb59eBCaf00100C00776b45c3E4b58c6B95");

Object Types

📘