Get farm balance

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
Line 3: Line 3:
 
== Parameters ==
 
== Parameters ==
  
'''Farm:''' The yield farm for which you want to check your LP token balance.
+
'''Farm:''' The yield farm from where you want to claim your rewards. If the farm you want isn't in the list, you can find it and get it added to the list via the '''$find farm by tokens''' function.
  
 
== Return Value ==
 
== Return Value ==
Line 12: Line 12:
  
 
<pre>
 
<pre>
 +
ui console view
 
config defi wallet("your private key")
 
config defi wallet("your private key")
log("Farm Balance: {$get farm balance("PancakeSwap Farm")}")
+
log("Farm Balance: {$get farm balance("DOGE_WBNB_Farm")}")
 
</pre>
 
</pre>
  
Line 20: Line 21:
 
Be mindful when you are handling your private key. It's a sensitive piece of data that allows full control over your funds in your DeFi wallet. Therefore, never share this key publicly or with anyone.
 
Be mindful when you are handling your private key. It's a sensitive piece of data that allows full control over your funds in your DeFi wallet. Therefore, never share this key publicly or with anyone.
  
The example command will return the current number of staked LP tokens you have in the specified farm on PancakeSwap.
+
The example command will return the current number of staked LP tokens you have in the specified farm.
  
 
Example Output:
 
Example Output:
Line 27: Line 28:
 
<p>Farm Balance: 50</p>
 
<p>Farm Balance: 50</p>
 
</blockquote>
 
</blockquote>
 
Knowing your staked balance in a farm allows you to track your investment and assist decisions on when to withdraw or add more LP tokens for yield farming. Be aware that LP token values can fluctuate based on the current state of the farm and market conditions.
 

Latest revision as of 00:12, 5 July 2023

$get farm balance is a function that returns the balance of LP (Liquidity Provider) tokens you have staked in a specific yield farm.

[edit] Parameters

Farm: The yield farm from where you want to claim your rewards. If the farm you want isn't in the list, you can find it and get it added to the list via the $find farm by tokens function.

[edit] Return Value

This function returns the total number of LP tokens you have staked in the chosen yield farm.

[edit] Example

ui console view
config defi wallet("your private key")
log("Farm Balance: {$get farm balance("DOGE_WBNB_Farm")}")

Please replace "your private key" with your actual DeFi wallet's private key.

Be mindful when you are handling your private key. It's a sensitive piece of data that allows full control over your funds in your DeFi wallet. Therefore, never share this key publicly or with anyone.

The example command will return the current number of staked LP tokens you have in the specified farm.

Example Output:

Farm Balance: 50

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox