coindicator icon indicating copy to clipboard operation
coindicator copied to clipboard

Number of fractional digits

Open ilazaridis opened this issue 4 years ago • 5 comments

Can we have up to 8 digits displayed after the decimal point ? Currently, numbers are rounded.

ilazaridis avatar May 28 '20 10:05 ilazaridis

Numbers are rounded until what I consider a meaningful amount of digits. For BTC to EUR, for instance, you will merely get 2 decimal places as I cannot fathom that anyone cares how many 1000ths of a Euro their stash is worth. But for coins of a smaller value in fiat, you'll see many more decimal places automatically (up to 8 IIRC).

bluppfisk avatar Aug 17 '20 20:08 bluppfisk

Problem is, the meaningful number is different for different tokens.

  • The default asset loaded is the value of ETH in terms of BTC. It shows 0.027 currently. This information isn't very helpful, since it barely moves for a long time. Users would appreciate precision like 0.0278.

  • I have NEST coins which if rendered would show 0.000038BTC which would be rounded up to 0.

Didn't find any config options to change the precision.

SmartLayer avatar Nov 20 '20 05:11 SmartLayer

commit 9536ddd should address this issue. It allows you to adjust the maximum number of decimals as well as the number of significant digits in user.conf. I also set a new default of 3 significant digits. Let me know how you fare with this change :)

bluppfisk avatar Nov 20 '20 18:11 bluppfisk

Thanks but … I hope @ilazaridis would agree, that when a user is using an indicator app, he actually wasn't expecting that the settings are changed by editing user.conf. examples are fcitx (Chinese input engine), system monitor apps and flameshot. but this is better than not able to change the decimal points for sure.

SmartLayer avatar Nov 22 '20 14:11 SmartLayer

Fair enough... This is a GUI app after all. I should include a GUI for the settings. State management is horrible/absent at the moment in this application, so I'd rather set this globally than on a per-ticker basis. It will also likely not apply until the next tick comes in.

bluppfisk avatar Nov 25 '20 16:11 bluppfisk