@gala-chain/api ∙ API
API > sqrtPriceToTick
Function: sqrtPriceToTick()
sqrtPriceToTick(
sqrtPrice
):number
Parameters
▪ sqrtPrice: BigNumber
The sqrt ratio for which to compute the tick
Returns
tick The greatest tick for which the ratio is less than or equal to the input ratio
Notice
Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio