Get farm balance

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
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.
+
'''$lp farm balance''' is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specified yield farm.
  
This function appeals to enterprise users engaging in yield farming who need to keep track of their staked LP tokens.
+
This function is beneficial for getting to know the number of LP tokens you have staked in a particular farm on a decentralized exchange.
 
+
== User Level ==
+
 
+
This function is exclusively available for enterprise users.
+
  
 
== Parameters ==
 
== Parameters ==
  
'''Farm:''' This represents the yield farm where you have staked your LP tokens.
+
'''Farm:''' The yield farm for which you want to check your staked LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment.
  
== Return Value ==  
+
== Return Value ==
 
+
This function returns a string denoting the number of LP tokens staked in the specified yield farm.
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
+
log("LP tokens staked in PancakeSwap farm: {$lp farm balance("PancakeSwap")}")
ui text msg("Your LP token balance staked in PancakeSwap is: {$defi farm balance("PancakeSwap")}")
+
 
</pre>
 
</pre>
  
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.
+
The output will display the number of LP tokens you have staked in the specified yield farm.
 +
 
 +
Example Output:
 +
<blockquote>
 +
<p>LP tokens staked in PancakeSwap farm: 10</p>
 +
</blockquote>
 +
 
 +
The actual balance will vary depending on the number of LP tokens you have staked in the farm.

Revision as of 19:09, 4 July 2023

$lp farm balance is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specified yield farm.

This function is beneficial for getting to know the number of LP tokens you have staked in a particular farm on a decentralized exchange.

Parameters

Farm: The yield farm for which you want to check your staked LP tokens. The available farms will be dependent on the "FarmNames" list set in your environment.

Return Value

This function returns a string denoting the number of LP tokens staked in the specified yield farm.

Example

log("LP tokens staked in PancakeSwap farm: {$lp farm balance("PancakeSwap")}")

The output will display the number of LP tokens you have staked in the specified yield farm.

Example Output:

LP tokens staked in PancakeSwap farm: 10

The actual balance will vary depending on the number of LP tokens you have staked in the farm.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox