Get token balance

From UBot Studio
Revision as of 19:05, 4 July 2023 by LillyT (Talk | contribs)

Jump to: navigation, search

$wallet balance is a function that gets your wallet balance for a given token. If your desired token isn't in the dropdown, you can manually enter its contract address.

This function provides you the balance of a specific token in your DeFi wallet.

Parameters

Chain: The blockchain chain your wallet is on. It can be either "Avalanche" or "BinanceSmartChain".

Token ID: The token for which you're seeking to check the balance in your wallet.

Return Value

This function returns a string which is the balance of the specific token in your DeFi wallet.

Example

log("BinanceSmartChain BUSD Balance: {$wallet balance("BinanceSmartChain","BUSD")}")
log("Avalanche Pangolin Balance: {$wallet balance("Avalanche","Pangolin")}")

The output of this function is the balance of the particular token in your DeFi wallet.

Example Output:

BinanceSmartChain BUSD Balance: 100 BUSD

Avalanche Pangolin Balance: 50 Pangolin

Remember, the balances will differ depending on the amount of the token you hold in your wallet.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox