What is the Default Rounding for 8 digits in Binance,tradingview,etc I have a problem. I am struggling to calculate programmatically the number of cryptocurrencies because I sometimes have inaccuracies in the last digit. Does anybody know what the problem is? (Of course, I have calculated the appropriate fees that need). For example, Binance uses accuracy for 8 Digits. What is the Rounding that they used? I would appreciate an answer if someone have the appropriate knowledge on this matter

RoundingMode.CEILING
RoundingMode.DOWN
RoundingMode.FLOOR
RoundingMode.HALF_DOWN
RoundingMode.HALF_EVEN
RoundingMode.HALF_UP
RoundingMode.UNNECESSARY
RoundingMode.UP
There should not be any rounding because all operations are integer operations. The 8 digits is because they calculate using the base unit of Bitcoin, the satoshi, which is 0.00000001 Bitcoin (8 digits). It is calculated as an integer (i.e. calculation uses satoshis, not Bitcoin) multiplied by an integer for the number of bytes, thus the result will also be an integer. The decimal then comes back as they shift the decimal point to represent the value in Bitcoin. There is no rounding involved, if there is, you are doing something wrong.