Skip to main content

Interface: TickFromPriceOptions

How tickFromPrice turns the exact logarithm into an integer tick.

Properties​

PropertyTypeDescription
rounding?"floor" | "nearest"'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.