From 1d20b3e77e3afd886c77b9d6f28cfaa5a6e3d5cf Mon Sep 17 00:00:00 2001 From: Jon Eyrick Date: Fri, 7 Sep 2018 11:28:56 +0300 Subject: [PATCH] add roundStep functionality, to help with stepSize --- php-binance-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-binance-api.php b/php-binance-api.php index c012a54f..fcb845db 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -1505,7 +1505,7 @@ private function depthData(string $symbol, array $json) * */ public function roundStep($value, $stepSize = 0.1) { - $precision = strlen(substr(strrchr(rtrim($value,'0'), '.'), 1)); + $precision = strlen(substr(strrchr(rtrim($stepSize,'0'), '.'), 1)); return round((($value / $stepSize) | 0) * $stepSize, $precision); }