Skip to main content
Version: 3.0.0

encodeSqrtRatioX96

@uniswap/v3-sdk / Exports / utils/encodeSqrtRatioX96 / encodeSqrtRatioX96

encodeSqrtRatioX96

encodeSqrtRatioX96(amount1: BigintIsh, amount0: BigintIsh): JSBI

Returns the sqrt ratio as a Q64.96 corresponding to a given ratio of amount1 and amount0

Parameters#

NameTypeDescription
amount1BigintIshthe numerator amount, i.e. amount of token1
amount0BigintIshthe denominator amount, i.en amount of token0

Returns: JSBI

Defined in: utils/encodeSqrtRatioX96.ts:9