Closed midnightkali closed 2 years ago
It seems like this issue is within the the Forex API. When requesting from them with EUR as the base, they return a string for those rates, but a float with any other base. Most likely this issue should be addressed there instead of in this codebase, but it could be fixed here as well. For reference, here is the API.
@midnightkali let me know if you find any issues.
from forex_python.converter import CurrencyRates
amount = 5 c = CurrencyRates()
eur = c.get_rate("EUR", "PHP") amount_eur = eur * amount
print(type(amount_eur)) print(amount_eur)
output - <class 'str'> 59.34259.34259.34259.34259.342
it returns a string not a float