Skip to content

Stable Release

Compare
Choose a tag to compare
@jaggedsoft jaggedsoft released this 08 Sep 12:57
· 197 commits to master since this release
4be9587

roundTicks: Used to round price with tickSize. Example: roundTicks(0.12345, '0.001') = 0.123

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');

Fixes PRICE_FILTER problem