Exchange rates with source crypto is sometimes inverted
Firstly, thank you for your work. Much appreciated.
The issue is the rate of exchange does not respect the order: from -> to for some source=crypto cases.
Example: https://api.exchangerate.host/convert?from=usd&to=eth&source=crypto
{
"motd": {
"msg": "If you or your company use this project or like what we doing, please consider backing us so we can continue maintaining and evolving this project.",
"url": "https://exchangerate.host/#/donate"
},
"success": true,
"query": {
"from": "USD",
"to": "ETH",
"amount": 1
},
"info": {
"rate": 1145.182585
},
"historical": false,
"date": "2021-02-05",
"result": 1145.182585
}
To add some more information here. As long as source=crypto even for regular currencies the rate is inverted.
Example: https://api.exchangerate.host/convert?from=usd&to=eur&source=crypto
{
"motd": {
"msg": "If you or your company use this project or like what we doing, please consider backing us so we can continue maintaining and evolving this project.",
"url": "https://exchangerate.host/#/donate"
},
"success": true,
"query": {
"from": "USD",
"to": "EUR",
"amount": 1
},
"info": {
"rate": 1.203956
},
"historical": false,
"date": "2021-02-08",
"result": 1.203956
}
To me, it seems the historical information is wrong. See example Bitcoin to USD (not correct prior to 2 May 2020):

@arzzen do you know if it's possible to correct historical information in the database?
I'm seeing this issue as well.
$ curl -s 'https://api.exchangerate.host/latest?base=USD&symbols=USD,BTC&source=crypto&places=12' | jq .rates.BTC
"0.000019086908"
$ curl -s 'https://api.exchangerate.host/latest?base=USD&symbols=USD,DOGE&source=crypto&places=12' | jq .rates.DOGE
"0.037495561690"
$ curl -s 'https://api.exchangerate.host/latest?base=USD&symbols=USD,ETH&source=crypto&places=12' | jq .rates.ETH
"1162.310469314080"
ETH seems inverted, but BTC and DOGE seem ok.
Any updates on this issue?
It seems to me that even querieng for list of all crypto rates returns inverted values sometimes: https://api.exchangerate.host/latest?base=USD&source=crypto
Pinging here as we are blocked on this. We use exchangerate.host for our fiat currency conversions and would like to use the same provider for crypto conversions.
However unless this is fixed we have to choose another provider.
@arzzen We (Quaestor) are a sponsor of yours and would be great if this could get prioritized as source=crypto is unusable/broken in its current state.
Also affected by this. It seems to be directly related to sources. BTC works out fine because it is actually available in some of the FOREX sources and seems to get served from there. Others that ace part of the CRYPTO only list (the majority of cryptocurrencies) seems to be consistently inverted. I'm post processing the fixed list on ones I need and inverting them myself, but this is very obnoxious.
Same here. Would be great if this can be fixed 😔