EvanRespaut / Equate

Unit converting calculator
GNU General Public License v3.0
67 stars 17 forks source link

USD conversion wrong #66

Open AntonGut opened 2 years ago

AntonGut commented 2 years ago

Converting to/from USD doesn't work for me. Tested with EUR, CAD and bunch of other currencies that work between each other. App says "units up to date" at every start. Screenshot_20220123-144928_Equate Screenshot_20220123-144902_Equate

alerque commented 2 years ago

I started seeing this a week or so ago too. Other currency combos seemed okay, just USD was whacked.

xcelente commented 2 years ago

I think this project has been abandoned which is a pity because I have used this app a lot in the past. I hope someone can pick this one up.

The fiat currency stats can be derived from the free ECB feed which is updated daily at 3pm. I'd also like someone to change the crypto prices by using the free Coinpaprika API to give us all the symbols, not just a select few. I would tip whoever fixes this app.

EvanRespaut commented 2 years ago

I'm having issues reproducing the odd currency bug. Try factory resting the app--hold the C button for a few seconds and then select Calculator factory reset. You can also clear cache/data in Android, same effect.

I'm already using both ECB and Coinpaprika for currency and crypto.

Side issue, cypto is not working for me. Coinpaprika seems to now be returning a JSON object that is 6.7MB (almost 10000 coins) and it's breaking my parsing code because it's so large. It would be very easy to fix if there was an option to not download every coin anyone has ever conceived of from Coinpaprika, and instead download the top 100 or something, but I can't find it in their API.

xcelente commented 2 years ago

Thanks for the reply.

I performed a factory reset and it now works fine. Am not sure why it went awry in the first place.

I agree, the Coinpaprika API does return more data than I'd like. For my personal projects, I pull the data every 30 mins onto a server and then I query from that. Perhaps you could do similar?

Personally, I frequently query coins that are ranked below 500. The problem is, market cap is just too blunt a tool and there are some solid projects (such as Beam) that really don't deserve to be excluded. Of course, there are still thousands of sh!tcoins.

alerque commented 2 years ago

I can confirm, I just did a data reset as described above and (besides having to reconfigure all my currencies) the USD conversion is getting sane value updates again. Thanks for the suggestion.

EvanRespaut commented 2 years ago

Glad that that helped!

Yeah regarding Coinpaprika, I don't have a server at this time and don't want to pay for one for this project, since this app doesn't generate revenue. The possible solution is parse the data with another parser that is more efficient, but this will require a lot of work.

xcelente commented 2 years ago

How about fetching individual coin data from a shortlist? For example, to get just bitcoin data you do:

https://api.coinpaprika.com/v1/tickers/btc-bitcoin

I don't know how efficient that is though, having many open calls in one go. Tbh, with the current setup, even though the returned data is a little large / inefficient, it always seems to download very fast for me.

xcelente commented 2 years ago

Sorry to report but the USD value went awry again after just a day or two. Am not sure why it's only happening now.

alerque commented 2 years ago

I have the same thing to report. My USD conversion just went bonkers again. It shows a successful refresh, but by it's new math the cost of the flight I was just looking up in Tenge is worth $48,917,631.14 — too much for one round trip ticket to anywhere, even the International Space Station!