Interface: TickFromPriceOptions
gSwap SDK 2.0.0-rc.4 / TickFromPriceOptions
Interface: TickFromPriceOptions
Defined in: packages/gswap-sdk/dist/index.d.ts:4335
How tickFromPrice turns the exact logarithm into an integer tick.
Properties
rounding?
optionalrounding?:"floor"|"nearest"
Defined in: packages/gswap-sdk/dist/index.d.ts:4342
'floor' (default): the greatest tick whose price is no greater than price, which is how
the contract places a price. 'nearest': the closest tick, a half rounding away from zero.
That is what a price INPUT wants (a person types a price, the field snaps to the nearest
tick), and it differs from 'floor' for any price in the upper half of a tick's range.