Skip to main content

Function: tickFromPrice

tickFromPrice(price, options?): number

Return the integer tick for a token1/token0 price: by default the greatest tick whose price is no greater than price; { rounding: 'nearest' } the closest tick. NaN for a price that is not positive and finite.

Parameters​

ParameterType
priceValue
options?TickFromPriceOptions

Returns​

number