You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a usecase where I am converting VND to USD but conversion rate are not valid. for example:
These values are not even close. if library is not supporting this currency than it should not convert. please let me know if this can be fixed. I need an API/Library which can convert all the currencies to usd even the local currencies. like Google finance
The text was updated successfully, but these errors were encountered:
Going from VND to USD I get an error, not a number:
Python 3.11.4 (main, Jun 20 2023, 16:59:59) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from forex_python.converter import CurrencyRates
>>> c = CurrencyRates()
>>> c.convert('VND', 'USD', 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/forex_python/converter.py", line 108, in convert
raise RatesNotAvailableError("Currency Rates Source Not Ready")
forex_python.converter.RatesNotAvailableError: Currency Rates Source Not Ready
I have noticed the same thing today with GBP to EUR. It broke yesterday. 2 days ago it was the correct 1.16, now it's 0.126 or something which is completely off.
from forex_python.converter import *
from datetime import datetime, timedelta
yesterday = datetime.now() - timedelta(days=1)
now = datetime.now()
c = CurrencyRates()
start_currency='GBP'
end_currency='EUR'
money = 1.0
result = c.get_rate(base_cur=start_currency, dest_cur=end_currency, date_obj=yesterday) * money
print(result)
this prints out 0.13268758707622902
even more interestingly if you use convert instead of get_rate, it gets you the correct amount
I have a usecase where I am converting VND to USD but conversion rate are not valid. for example:
![Screenshot 2023-07-24 at 1 31 35 PM](https://private-user-images.githubusercontent.com/85872908/255532943-d505bd73-24e8-4d49-82a8-25654060d668.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2ODE5NTIsIm5iZiI6MTcyNTY4MTY1MiwicGF0aCI6Ii84NTg3MjkwOC8yNTU1MzI5NDMtZDUwNWJkNzMtMjRlOC00ZDQ5LTgyYTgtMjU2NTQwNjBkNjY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDA0MDA1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxYTVlOWNmMzhjZTJhNWFmMmQ2OTlkMjBjODRiM2YxOWJhNzJjODIxZDdkMzVkNGMzOWM5ZTNhNDBjMWNmZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sS9OzJAgXQUj18awiUG05D-z1CYuhXnyjEjPLeOrq3g)
![Screenshot 2023-07-24 at 1 31 50 PM](https://private-user-images.githubusercontent.com/85872908/255532954-55c56071-24ef-4299-b889-1b39a17af37e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU2ODE5NTIsIm5iZiI6MTcyNTY4MTY1MiwicGF0aCI6Ii84NTg3MjkwOC8yNTU1MzI5NTQtNTVjNTYwNzEtMjRlZi00Mjk5LWI4ODktMWIzOWExN2FmMzdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDA0MDA1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5YjcxZGIzNzJiZDlmM2Y4N2ZlY2Y4NzRlMDQyODg2OGEzNmVmMTRhZWIzMjRmNDIzYTE1ODk3ZTZlODM1MTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lxm1GCPFA6QUPmt2AkNjgr-pRlzgqbpOr6ulNqw3kLc)
These values are not even close. if library is not supporting this currency than it should not convert. please let me know if this can be fixed. I need an API/Library which can convert all the currencies to usd even the local currencies. like Google finance
The text was updated successfully, but these errors were encountered: