Get farm balance
From UBot Studio
(Difference between revisions)
(Created page with "'''$get lp token balance''' is a function that returns the balance of Liquidity Provider (LP) tokens you have staked in a particular yield farm. Yield farming, also known as ...") |
|||
Line 1: | Line 1: | ||
− | '''$ | + | '''$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. | |
+ | |||
+ | == User Level == | ||
+ | |||
+ | This function is exclusively available for enterprise users. | ||
== Parameters == | == Parameters == | ||
− | '''Farm:''' | + | '''Farm:''' This represents the yield farm where you have staked your LP tokens. |
− | == Return Value == | + | == Return Value == |
− | This function returns a string representing the | + | This function returns a string value representing the amount of LP tokens you currently have staked in a specified yield farm. |
== Example == | == Example == | ||
<pre> | <pre> | ||
− | + | define areacode | |
+ | ui text msg("Your LP token balance staked in PancakeSwap is: {$defi farm balance("PancakeSwap")}") | ||
</pre> | </pre> | ||
− | In | + | 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. |
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 18:32, 4 July 2023
$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.