Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect ETH To USD conversion #6

Open
ls-milkyway opened this issue Mar 29, 2022 · 5 comments
Open

Incorrect ETH To USD conversion #6

ls-milkyway opened this issue Mar 29, 2022 · 5 comments

Comments

@ls-milkyway
Copy link

ls-milkyway commented Mar 29, 2022

I am not able to get the correct price of ETH To USD ...it is always showing some outrageous value like: 0.000xxx.....also BTC -> USD is not reflecting updated price.

@ls-milkyway ls-milkyway changed the title ETH To USD is not correct? Uncorrect ETH To USD conversion Apr 5, 2022
@ls-milkyway ls-milkyway changed the title Uncorrect ETH To USD conversion Incorrect ETH To USD conversion Apr 11, 2022
@ls-milkyway
Copy link
Author

No response ?????

@rubenwardy
Copy link
Owner

Hi, this is a mirror repo so I missed this.

The problem is that the API I'm using is returning bad data. Here's what it's saying the value of 1 USD is in different symbols:

"BTC": "0.0000484389",
"BNB": "197.6991039782",
"DOGE": "0.0544922052",
"ADA": "0.4446395949",
"XRP": "0.2939631553",
"DOT": "7.2880521365",
"ETH": "1023.2444203642"

I'll have to see if there's other API services I can use

@ls-milkyway
Copy link
Author

ls-milkyway commented Jun 22, 2022

Hmm, why are u not using free & reliable (with clear & precise API docs) coinmarketcap API ....I am using it flawlessly in google sheets ...with javascript ......but I need the prices on the browser for an instant preview.
if u need any assistance...regarding the code or API then let me know.

@rubenwardy
Copy link
Owner

rubenwardy commented Jun 22, 2022

Because the widget is added primarily for foreign exchange currencies, not crypto. Crypto came at no extra implementation cost with the API: https://exchangerate.host/

I'll need to switch to a crypto specific data source now, given that that API gives incorrect data

@ls-milkyway
Copy link
Author

ls-milkyway commented Jun 22, 2022

I'll need to switch to a crypto specific data source now, given that that API gives incorrect data

It seems customer support at https://exchangerate.host/ is dead or they are lazy to rectify the problem...in any case:
FYI:

  1. Although coinmarketcap is reliable & has free plan but it has usage limitations check here
  2. Nomics is another good & reliable option but has 1 request per second limitation (can be handled by the code).
  3. Coinpaparika has 10 request per second.
  4. Messari has:
    Without an API key, requests are rate limited to 20 requests per minute and 1000 requests per day. Users that create an account will have slightly higher limits of 30 requests per minute and 2000 requests per day. PRO users have the highest limit at 60 requests per minute up to a maximum of 4000 requests per day.

Well, I guess you will need an API with no daily or monthly limitations as request/second can be handled.......further the service should not change their API versions frequently ......also any change in code is PITA as you will have to make changes in your widget code. So I guess Nomics & Coinpaparika are the 2 which u can consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants