bluppfisk / coindicator

A crypto-currency (Bitcoin, Ethereum et al) market price indicator for the Linux desktop. Sits in the tray and lets you set alerts. Supports GNOME, Unity and KDE.
MIT License
159 stars 40 forks source link

Number of fractional digits #70

Open ilazaridis opened 4 years ago

ilazaridis commented 4 years ago

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

bluppfisk commented 4 years ago

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).

SmartLayer commented 3 years ago

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

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

bluppfisk commented 3 years ago

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 :)

SmartLayer commented 3 years ago

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.

bluppfisk commented 3 years ago

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.