Skip to content

Commit 1d20b3e

Browse files
author
Jon Eyrick
authored
add roundStep functionality, to help with stepSize
1 parent 9752109 commit 1d20b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php-binance-api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ private function depthData(string $symbol, array $json)
15051505
*
15061506
*/
15071507
public function roundStep($value, $stepSize = 0.1) {
1508-
$precision = strlen(substr(strrchr(rtrim($value,'0'), '.'), 1));
1508+
$precision = strlen(substr(strrchr(rtrim($stepSize,'0'), '.'), 1));
15091509
return round((($value / $stepSize) | 0) * $stepSize, $precision);
15101510
}
15111511

0 commit comments

Comments
 (0)