Get liquidity pool balance
$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.
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.
Parameters
Exchange: The decentralized exchange where the liquidity pool resides. The available exchanges will depend on the "SwapNames" 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 tokens. The available tokens will be dependent on the "CoinNames" list set in your environment.
Return Value
This function returns a string of your balance of LP tokens in the specified liquidity pool.
Example
log("LP tokens in DAI-USDC SushiSwap pool: {$lp balance("SushiSwap", "DAI", "USDC")}")
The output will display the number of LP tokens you hold in the specified liquidity pool.
Example Output:
LP tokens in DAI-USDC SushiSwap pool: 10
The actual balance of LP tokens will depend on the amount of liquidity you have provided to the pool.