Skip to main content

Function: tickFromPrice()

gSwap SDK 2.0.0-rc.4


gSwap SDK 2.0.0-rc.4 / tickFromPrice

Function: tickFromPrice()

tickFromPrice(price, options?): number

Defined in: packages/gswap-sdk/dist/index.d.ts:4349

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​

price​

Value

options?​

TickFromPriceOptions

Returns​

number