Get Expected Tokens
Parameter Description:
jetton0
: The address of the first tokenamount0
: The quantity of the first tokenjetton1
: The address of the second tokenamount1
: The quantity of the second token
Example Request:
This request will query how many liquidity tokens (LP tokens) are expected to be received when providing 1000 tokens with the address 0x1234567890
and 500 tokens with the address 0x0987654321
.
Successful Response:
Response Field Description:
success
: Whether the request was successfuldata.expectedLPTokens
: The expected number of liquidity tokens received
By calling this API endpoint and providing token addresses and quantities, you can estimate how many LP tokens you will receive before adding liquidity. This helps users assess their investment returns before providing liquidity.
Note that the actual number of LP tokens received may differ slightly from the expected value, depending on transactions that occur in the pool between the API call and the actual provision of liquidity. However, this endpoint provides a good estimate, helping users make informed decisions.