Skip to content
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

Converting to EUR #99

Closed
midnightkali opened this issue Jul 27, 2021 · 3 comments
Closed

Converting to EUR #99

midnightkali opened this issue Jul 27, 2021 · 3 comments

Comments

@midnightkali
Copy link

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

@abbyjng
Copy link

abbyjng commented Aug 1, 2021

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.

@abbyjng
Copy link

abbyjng commented Aug 2, 2021

This should be resolved now via this issue and commit.

@ashwin31 ashwin31 closed this as completed Aug 7, 2022
@ashwin31
Copy link
Member

ashwin31 commented Aug 7, 2022

@midnightkali let me know if you find any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants