Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
add roundStep functionality, to help with stepSize
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Eyrick authored Sep 7, 2018
1 parent 9752109 commit 1d20b3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 1d20b3e

Please sign in to comment.