Skip to content

v0.4.6

  • v0.4.6
  • 4be9587
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v0.4.6
  • 4be9587
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
tagged this 08 Sep 12:56
> roundTicks: Used to round price with tickSize. Example: `roundTicks(0.12345, '0.001') = 0.123`
```php
function roundTicks($price, $tickSize) {
        $precision = strlen(rtrim(substr($tickSize,strpos($tickSize, '.', 1) + 1), '0'));
        return number_format($price, $precision, '.', '');
}
echo roundTicks(0.00016552, '0.00000010');
```
Assets 2
Loading