This commit is contained in:
2026-02-04 14:52:09 +09:00
parent a51ffb6193
commit 1787b72499
11 changed files with 314 additions and 112 deletions
+12
View File
@@ -14,6 +14,18 @@ object MarketUtil {
return now.isAfter(start) && now.isBefore(end)
}
fun getTickSize(price: Double): Double {
return when {
price < 2000 -> 1.0
price < 5000 -> 5.0
price < 20000 -> 10.0
price < 50000 -> 50.0
price < 200000 -> 100.0
price < 500000 -> 500.0
else -> 1000.0
}
}
fun roundToTickSize(price: Double): Double {
val tick = when {
price < 2000 -> 1.0