Zero Hash allows users to submit transactions with any trade price, however when we actually calculate settlement obligations, we round to certain precision levels that are determined by the asset on a trade by trade basis.
For example, you might submit a BTC/USD trade with quantity of 10 BTC and a price of $10,000.0008 per BTC. An initial calculation would find that the total USD obligation as 10 BTC x $10,000.0008 = $100,000.008. However, as USD payments are restricted to cents, we round to $100,000.01.
The table of assets and precisions is as follows:
*Uses bankers rounding. (Round to Even)
If you are utilizing the Zero Hash API to calculate trade notionals and settlement values, bankers rounding must be used on a per trade basis. Zero Hash settlement system will round each trade obligation and then sum at the end vs. summing all trade obligations then rounding the final value. Bankers rounding is other known as Round to Even.
- If the difference between the number and the nearest integer is less than 0.5, round to the nearest integer.
- If the difference between the number and the nearest integer is exactly 0.5, look at the integer part of the number.