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

Add exchange rates as convenience methods #15

Open
melvinroest opened this issue Aug 8, 2020 · 1 comment · May be fixed by #17
Open

Add exchange rates as convenience methods #15

melvinroest opened this issue Aug 8, 2020 · 1 comment · May be fixed by #17

Comments

@melvinroest
Copy link

melvinroest commented Aug 8, 2020

https://trader.degiro.nl/trader/#/products/705366/overview is the EUR/USD exchange rate. You can find this quite easily via the main menu.

I made a convenience method as follows:

def get_euro_dollar():
    return degiro.real_time_price(705366, degiroapi.Interval.Type.One_Day)[0]['data']['lastPrice']

Is it an idea to add something like this to the codebase for multiple currencies?

@blunderedbishop
Copy link

blunderedbishop commented Aug 21, 2020

I can try to do this. What would you like to see added besides the real time quote?

Most of the time you can use the search_products method searching for the desired rate (e.g. 'EUR/GBP') to get the info you want. Sometimes it appears as a second result (e.g. 'EUR/USD'), so in this case use set the limit parameter to 2. Beware that the price that is returned through the search_products method is the last day's closing price, not the real time one.

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

Successfully merging a pull request may close this issue.

2 participants