-
Notifications
You must be signed in to change notification settings - Fork 197
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
theforexapi.com is not working #149
Comments
It hasn't been working since 16th of October. |
Hi, the API pulls form the European Central Bank website. Alternatively, you can go to the ECB website and just download the csv. a more automated way of doing this is the following: import requests url = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip?a6ef9319d740f54c034942a0317114f8" response = requests.get(url) csv_file = z.namelist()[0] #Rename the file to your desired filepath ...... This way you can reference the csv file you have downloaded instead of referencing the api. |
Based on @Andrewnolan13 comments MicroPyramid/forex-python#149 (comment) created a function to get the rates for specific currencies for a specific (or close to it) date.
Based on @Andrewnolan13 comment I created a function which downloads the ZIP and generates the rates. See https://github.com/ddofborg/exchange_rates Get a list of exchange rates for a given currency on a given date. Data is download from Note, rates are not cached. Each request will download the data again. Usage: >>> from exchange_rates import get_exchange_rates
>>> print( get_exchange_rates('USD', target_currencies=['EUR', 'CAD', 'USD'], on_date='2023-10-01') )
{'EUR': 0.9496676163342831, 'CAD': 1.3613485280151947, 'USD': 1.0}
>>> print( get_exchange_rates('EUR', target_currencies=['EUR', 'CAD', 'USD'], on_date='2023-10-01') )
{'EUR': 1.0, 'CAD': 1.4335, 'USD': 1.053} |
Is there any update regarding when the API will be again up ? |
Hello, any updates? |
@abhijeet-1110 hi API is not working, ERROR 504, fix please. |
@abhijeet-1110 please fix API |
I think theforexapi.com is dead. Some other packages which work: https://github.com/ddofborg/exchange_rates (mine, returns a dict with rates) and https://github.com/oddaspa/easy-exchange-rates (returns a pandas dataframe). |
@ALL Sorry for the inconvenience. It is working now. Please check |
@ddofborg I made a wrapper that caches the rates and only downloads new rates once a day. It migh be useful to others. |
Is there a way to make the API available again? It's down as many people mentioned here 😄 |
The api / the python module is very unreliable I have to say. Serveral days unavailable each month. |
@ALL My sincere apologies to all,Due to server upgradtion currently facing the issue. |
You can't repeat the problem, or you can't repeat the solution you used before? |
There are some other packages which use ECB data (with caching). That should stay up:) |
@ddofborg i downloaded exchange_rates but there is no function get_exchange_rates in it? |
It's there: |
Hello, still not working |
Please give me some context, otherwise there is really no advice I can give you. |
theforexapi.com is not working, can I change the API to another one? Please fix the problem as soon as possible
The text was updated successfully, but these errors were encountered: