Get liquidity pool value

From UBot Studio
Revision as of 18:31, 4 July 2023 by LillyT (Talk | contribs)

Jump to: navigation, search

$defi liquidity pool value is a function that calculates the value of your investment in a liquidity pool on a specific decentralized exchange, shown in USD.

This function is extremely useful for enterprise users who are providing liquidity on decentralized exchanges and want to know the current value of their investment.

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 value of your liquidity pool investment in USD.

Example

define areacode
ui text msg("Your investment value in USDT/ETH on Uniswap is: {$defi liquidity pool value("Uniswap", "USDT", "ETH")}")

In this example, the function is calculating the current value of your investment in the USDT/ETH liquidity pool on Uniswap in USD, and then displaying that value in the UI.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox