GET
/
getExpectedTokens

Parameter Description:

  • jetton0: The address of the first token
  • amount0: The quantity of the first token
  • jetton1: The address of the second token
  • amount1: The quantity of the second token

Example Request:

GET /getExpectedTokens?jetton0=0x1234567890&amount0=1000&jetton1=0x0987654321&amount1=500

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:

{
  "success": true,
  "data": {
    "expectedLPTokens": 2000
  }
}

Response Field Description:

  • success: Whether the request was successful
  • data.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.

Query Parameters

jetton0
string
required
amount0
number
required
jetton1
string
required
amount1
number
required