Howchoo / crypto-ticker

25 stars 15 forks source link

Need to display 0.0000xx prices #27

Open PDM78 opened 2 years ago

PDM78 commented 2 years ago

I'm looking to display prices that are a few decimal places to the right. Unfortunately, the code does not display JASMY price, instead just a 0.00. Is there a way to show the full price?

Thanks in advance.

Phil.

davidchung-coin-cloud commented 2 years ago

I was able to do this by modifying this line:

price = f"{cur_symbol}{data[cur]:,.2f}"

in price_apis.py, to read:

price = f"{cur_symbol}{data[cur]:,.8g}"

I did this on line 180 because I'm using CoinGecko. You could do the same on line 116 if you are using coinmarketcap.

uahekker commented 2 years ago

thanks that helped