MicroPyramid / forex-python

Foreign exchange rates, Bitcoin price index and currency conversion using ratesapi.io
http://forex-python.readthedocs.io/en/latest/usage.html
MIT License
661 stars 195 forks source link

raise RatesNotAvailableError("Currency Rates Source Unavailable.") forex_python.converter.RatesNotAvailableError: Currency Rates Source Unavailable. #153

Open Ana-Niko-byte opened 8 months ago

Ana-Niko-byte commented 8 months ago

Hi all, is the API down again? It was working perfectly 30 mins ago

M-Borsuk commented 8 months ago

Same issue here.. Api seems to be down.

Ana-Niko-byte commented 8 months ago

Any idea when it should be back up running? Need it for a project due in 4 days :(

GonzaloJMan commented 8 months ago

Ay updates on this?

paridev commented 8 months ago

Same issue here! any update?

GonzaloJMan commented 8 months ago

Doesn't look like. I had to comment the library in the code, as it was returning every time I tried to use it a weird "Module not imported forex_python" with an Error 522 , even if the code hadn't change in 14 months...

Dub27 commented 8 months ago

Connection appears to be down -> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000170363F6E10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

billy-moore-98 commented 8 months ago

API is still down as of 28/02, any help would be greatly appreciated: forex_python.converter.RatesNotAvailableError: Currency Rates Source Not Ready.

sebastianboscan commented 8 months ago

Same issue here. I was able to work around it by using the bitcoin converter instead.

from forex_python.bitcoin import BtcConverter
b = BtcConverter()

# Input type of currency (EUR, USD, GBP, CAD, AUD, and others)
source_currency = input("Currency: ").upper()
target_currency = input("Target currency: ").upper()

# Get the amount to exchange
amount_to_exchange = int(input(f"How much {source_currency} would you like to exchange? "))

# Get the price of Bitcoin in the currency being exchanged
btc_amount = b.convert_to_btc(amount_to_exchange, source_currency)
print(f"Price of {amount_to_exchange} {source_currency}: {btc_amount}")

# Convert Bitcoin to the target currency
exchange_rate = b.convert_btc_to_cur(btc_amount, target_currency)
print(f"{amount_to_exchange} {source_currency} = {exchange_rate} {target_currency}")

Could my code be better? Absolutely. I'd add some kind of check to the user input (such as making sure that the currency they typed does exist) but this is good for my use case as is.

Hope this helps as a temporary solution!

danimaeztu commented 8 months ago

I think i'ts down again

yunhongz commented 6 months ago

Any other alternatives?

cowiekw commented 6 months ago

@yunhongz I had success with https://pypi.org/project/CurrencyConverter/