2
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
I am currently debugging exactly the same behaviour as you describe in this issue. My balance for ETH does not add up if compared to my own calculations. At the moment, I assume that Binance does not credit the full amount of the deposit (e.g. 14 decimal places) to the account balance, but strips it to the precision they internally use (e.g. 8 decimal places). If I thereby apply
RoundingMode.DOWNas rounding mode, my results become valid.I am still looking to get any confirmation on that though. – croeck – 2019-08-31T20:56:19.400