Get liquidity pool balance
(Created page with "'''$get lp tokens''' is a function that returns the quantity of Liquidity Provider (LP) tokens that you have in a liquidity pool on a decentralized exchange (DEX). LP tokens ...") |
|||
Line 1: | Line 1: | ||
− | '''$ | + | '''$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. |
− | LP tokens | + | 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. |
+ | |||
+ | == User Level == | ||
+ | |||
+ | This function is exclusively available for enterprise users. | ||
== Parameters == | == Parameters == | ||
− | '''Exchange:''' The decentralized exchange where | + | '''Exchange:''' The decentralized exchange where your liquidity pool is located. |
− | '''Token A ID:''' The first token | + | '''Token A ID:''' The ID of the first token in the liquidity pool. |
− | '''Token B ID:''' The second token | + | '''Token B ID:''' The ID of the second token in the liquidity pool. |
− | == Return Value == | + | == Return Value == |
− | This function returns a string | + | This function returns a string value which is the current quantity of LP tokens you hold. |
== Example == | == Example == | ||
<pre> | <pre> | ||
− | + | ui text msg("Your USDT/ETH LP tokens on Uniswap are: {$defi liquidity pool tokens("Uniswap", "USDT", "ETH")}") | |
</pre> | </pre> | ||
− | In | + | 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. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 18:31, 4 July 2023
$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.