Skip to content

Commit 4bfb43a

Browse files
authored
fix numberOfDecimals by max-grim
2 parents 8e7e68e + b9ee0cb commit 4bfb43a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

php-binance-api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ public function marketBuyTest(string $symbol, $quantity, array $flags = [])
334334
* @param $val float the minimum order amount for the pair
335335
* @return integer (signifcant digits) based on the minimum order amount
336336
*/
337-
public function numberOfDecimals($val = 0.00000001) {
338-
$val = sprintf("%.18f", $val);
337+
public function numberOfDecimals($val = 0.00000001){
338+
$val = sprintf("%.14f", $val);
339339
$parts = explode('.', $val);
340340
$parts[1] = rtrim($parts[1], "0");
341341
return strlen($parts[1]);

0 commit comments

Comments
 (0)