Get farm balance
From UBot Studio
$defi farm balance is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specific yield farm.
This function appeals to enterprise users engaging in yield farming who need to keep track of their staked LP tokens.
Contents |
User Level
This function is exclusively available for enterprise users.
Parameters
Farm: This represents the yield farm where you have staked your LP tokens.
Return Value
This function returns a string value representing the amount of LP tokens you currently have staked in a specified yield farm.
Example
define areacode ui text msg("Your LP token balance staked in PancakeSwap is: {$defi farm balance("PancakeSwap")}")
In this example, the function is fetching the balance of LP tokens staked in the yield farm on PancakeSwap, and the amount is then displayed in the UI.