Get liquidity pool balance
$defi liquidity pool tokens 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 function is especially useful for enterprise users who have staked in a liquidity pool and want to know the quantity of LP tokens they hold.
Contents |
User Level
This function is exclusively available for enterprise users.
Parameters
Exchange: The decentralized exchange where your liquidity pool is located.
Token A ID: The ID of the first token in the liquidity pool.
Token B ID: The ID of the second token in the liquidity pool.
Return Value
This function returns a string value which is the current quantity of LP tokens you hold.
Example
ui text msg("Your USDT/ETH LP tokens on Uniswap are: {$defi liquidity pool tokens("Uniswap", "USDT", "ETH")}")
In this example, the function is calculating the quantity of LP tokens you hold in the USDT/ETH liquidity pool on Uniswap and displaying that value in the UI.