Closed breign closed 4 years ago
Ah rats... I've put the word out to see if the owner gets in contact...
I think I have some old code lying around where I combined two separate APIs to get us by...
It's a bit late here though so won't be able to get a fix out for at least 1 or 2 days sorry.
https://github.com/AustEcon/bitsv/pull/33
This pull request might have useful code we can re-use...
https://api.bitfinex.com/v1/pubticker/bsvusd
Works... so we can figure something out...
I don't understand why it's not falling back to that API in the first place.
Ah, it's because it's a json decoding failure. The API returns a 302 which gives a 200 and the output isn't JSON. JSON decoding failures aren't in our ignored errors.
We should probably first yank out the bitcoinsvrates part of the API, which would leave us without redundancy (which was broken for a while anyways) but get things working again.
Hmm. I think the reason it's down is that not only the 1st rates API has probably been down a while but the 2nd one for redundancy has also gone down... https://www.freeforexapi.com/api/live?pairs=USDAUD
I'm googling but not finding any suitable replacement yet... is this an urgent thing for you? If we can find a suitable API it should be an easy fix to just swap out the url basically and remove unsupported currencies...
Pull Requests welcome...
If we cannot find a free API with no signups our options become: 1) Run one ourselves... (I don't like that option) 2) Add to the library an easy method for adding the API_KEY + url of a few supported, Free Exchange rate APIs people want to go and sign up to...
We have a winner! https://www.exchangerate-api.com/
new version is now out on pypi
Works, thank you!!
domain bitcoinsv-rates.com has expired api at http://bitcoinsv-rates.com/api/rates/ used by satoshi_to_currency_cached is broken is there some other api that can be consumed?