Get farm balance

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(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:
'''$get lp token balance''' is a function that returns the balance of Liquidity Provider (LP) tokens you have staked in a particular yield farm.
+
'''$defi farm balance''' is a function that retrieves the balance of Liquidity Provider (LP) tokens staked in a specific yield farm.
  
Yield farming, also known as liquidity mining, is a process that allows cryptocurrency holders to lock up their holdings, in return for rewards, typically in the form of additional cryptocurrency.
+
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:''' The yield farm where you have staked your LP tokens.
+
'''Farm:''' This represents the yield farm where you have staked your LP tokens.
  
== Return Value ==
+
== Return Value ==  
  
This function returns a string representing the quantity of staked LP tokens you have 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>
log("LP Tokens Staked in Farm: {$get lp token balance("SushiSwap")}")
+
define areacode
 +
ui text msg("Your LP token balance staked in PancakeSwap is: {$defi farm balance("PancakeSwap")}")
 
</pre>
 
</pre>
  
In the example above, the function retrieves the balance of LP tokens staked in the specified yield farm on the SushiSwap network and logs the balance.
+
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.
 
+
**Please note:**
+
 
+
This function will only show the balance of your LP tokens staked in the yield farm. It does not fetch the underlying assets or their value. For that, you will need to use additional functions like '''$get liquidity value''' and others.
+

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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox