getTokenBalancesByAddress

Fetch the token balances (ERC20 standard) for a specific wallet by address.

This function returns the balance of all tokens currently supported by Venly. The list of supported tokens can be found on Github. Tokens need to be based on the ERC20 standard, this included for example ERC20, VIP180, TRC20, ...

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

📘

🧙 To add support in Venly for a certain token, simply submit a pull request.

Signature:

venlyConnect.api.getTokenBalancesByAddress(secretType: SecretType, walletAddress: string): Promise<TokenBalance[]>

Returns:

Promise<TokenBalance[]>

Parameters:

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

Example:

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

Object Types

📘