Get liquidity pool balance

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
'''$lp balance''' is a function that shows how many Liquidity Provider (LP) tokens you have. LP tokens are given when you invest into a liquidity pool, and they represent your stake in the pool.
+
'''$get liquidity pool balance''' is a function that returns the number of LP (Liquidity Provider) tokens you have from a specific liquidity pool on a decentralized exchange.
  
This command is helpful for liquidity providers who want to check the number of LP tokens they possess in a particular pool on a decentralized exchange.
+
LP tokens are given when you invest into a liquidity pool. They represent your share or stake in the pool.
  
 
== Parameters ==
 
== Parameters ==
  
'''Exchange:''' The decentralized exchange where the liquidity pool resides. The available exchanges will depend on the "SwapNames" list set in your environment.
+
'''Exchange:''' The decentralized exchange where the liquidity pool resides.
  
'''Token A ID''' and '''Token B ID:''' The pair of tokens involved in the liquidity pool for which you want to check your LP tokens. The available tokens will be dependent on the "CoinNames" list set in your environment.
+
'''Token A ID''' and '''Token B ID:''' The pair of tokens involved in the liquidity pool for which you want to check your LP token balance.
  
 
== Return Value ==
 
== Return Value ==
This function returns a string of your balance of LP tokens in the specified liquidity pool.
+
 
 +
This function returns the number of LP tokens you currently hold from the specified liquidity pool.
  
 
== Example ==
 
== Example ==
 +
 
<pre>
 
<pre>
log("LP tokens in DAI-USDC SushiSwap pool: {$lp balance("SushiSwap", "DAI", "USDC")}")
+
config defi wallet("your private key")
 +
log("LP Token Balance: {$get liquidity pool balance("PancakeSwap", "ETH", "DAI")}")
 
</pre>
 
</pre>
  
The output will display the number of LP tokens you hold in the specified liquidity pool.
+
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 LP tokens you hold in the ETH-DAI pool on PancakeSwap.
  
 
Example Output:
 
Example Output:
 +
 
<blockquote>
 
<blockquote>
<p>LP tokens in DAI-USDC SushiSwap pool: 10</p>
+
<p>LP Token Balance: 10</p>
 
</blockquote>
 
</blockquote>
  
The actual balance of LP tokens will depend on the amount of liquidity you have provided to the pool.
+
Knowing your LP token balance is crucial to understand your stake in the liquidity pool, as it can be redeemed for the respective invested tokens when removed from the pool. Be aware that LP token values can fluctuate based on the current state of the liquidity pool and market condition.

Revision as of 20:04, 4 July 2023

$get liquidity pool balance is a function that returns the number of LP (Liquidity Provider) tokens you have from a specific liquidity pool on a decentralized exchange.

LP tokens are given when you invest into a liquidity pool. They represent your share or stake in the pool.

Parameters

Exchange: The decentralized exchange where the liquidity pool resides.

Token A ID and Token B ID: The pair of tokens involved in the liquidity pool for which you want to check your LP token balance.

Return Value

This function returns the number of LP tokens you currently hold from the specified liquidity pool.

Example

config defi wallet("your private key")
log("LP Token Balance: {$get liquidity pool balance("PancakeSwap", "ETH", "DAI")}")

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 LP tokens you hold in the ETH-DAI pool on PancakeSwap.

Example Output:

LP Token Balance: 10

Knowing your LP token balance is crucial to understand your stake in the liquidity pool, as it can be redeemed for the respective invested tokens when removed from the pool. Be aware that LP token values can fluctuate based on the current state of the liquidity pool and market condition.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox