getRateLiquidityDepthByPair
This function is used to calculate the amount of liquidity that exists for a specific pair up to the specified exchange rate.
Name | Type | Description |
---|---|---|
sourceToken | token address | The token being sold. |
targetToken | token address | The token being bought. |
rate | string (number) | The number of target tokens per base token. |
Returns
This function returns a string with the amount of liquidity available at the specified rate.
Last updated