Rounds a price to the appropriate precision based on the tick size.
roundTicks(123.456789, 0.01) // returns "123.46"roundTicks("100.12345", 0.001) // returns "100.123" Copy
roundTicks(123.456789, 0.01) // returns "123.46"roundTicks("100.12345", 0.001) // returns "100.123"
The price to round, can be a string or number
The tick size that determines the precision (e.g., 0.01 for 2 decimal places)
The price rounded to the precision specified by the tick size
Rounds a price to the appropriate precision based on the tick size.
Example