-
Notifications
You must be signed in to change notification settings - Fork 382
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 currency to ETF/Funds #172
Comments
Hi again @typhoon71! This feature seems perfect to me, but since investpy internally uses the Investing.com Search Engine I need to do some research before telling you if it is or it is not possible. Additionally, if the original search results do not provide the currency I think I can develop a method to retrieve the currency once the search results are retrieved. For example, you search Let me do more research over this feature and I will let you know as soon as possible if I can implement it or not. Thank you! Remember to star the repo if you found it useful and follow me at GitHub so as to get notified of all the updates! |
A method like That way one could retrieve the list of instruments with on |
HY, |
@RamonGuixa: one may want to check all the quotes for an etf given in un currency, even in different nations (say, to find the best execution exchange). I suppose you can say that given the exchange one knows the currency used, but I'm not too sure if assuming that is good in general (i.e.: IE00BJQTJ848). That's one of the reasons I second that addition to |
Also, if you don't add the currency and "go by echange" the user will need a method to link currency to exchange. It would then make sense to include it in investpy (but if the currency is added in investpy.search_quotes() results it would be even better). Side note: investpy.search_quotes() works nicely and the issues I had with dates are fixed in the dev branch. Thanks a lot alvarobartt. |
Hi all, Ran into an ETF where I couldn't poll information via get_etf_historical_data which would have provided a currency. I then resorted the workaround proposed in #148 to get the data but they are lacking currency information. I really like .search_quotes() as it allows you to poll data for various instruments in a unified way and would love it to provide currency information. |
Hi all, I really wantend to have access to the currency information right now and found a dirty hack:
Cheers, -- |
Hi @typhoon71, @RamonGuixa and @Fetix 🤗 I'll release Make sure to watch the current milestone https://github.com/alvarobartt/investpy/milestone/2 so as to keep an eye on all the I may also post information about the release on my Twitter account, feel free to follow if you want/need more information about |
Hi again @typhoon71, @RamonGuixa and @Fetix! 🤗 I've already implemented a function to retrieve the default currency of every >>> import investpy
>>> search_result = investpy.search_quotes(text='apple', n_results=1)
>>> print(search_result)
{"id_": 6408, "name": "Apple Inc", "symbol": "AAPL", "country": "united states", "tag": "/equities/apple-computer-inc", "pair_type": "stocks", "exchange": "NASDAQ"}
>>> currency = search_result.retrieve_currency()
>>> print(currency)
USD
>>> print(search_result.default_currency)
USD Also see below that it's pretty simple but efficient and the elapsed time to retrieve the currency is less than 300ms, which is something nice too! /workspace/investpy $ time python -c "import investpy;data = investpy.search_quotes('apple', n_results=1);curr = data.retrieve_currency()"
real 0m1.384s
user 0m0.841s
sys 0m0.736s
/workspace/investpy $ time python -c "import investpy;data = investpy.search_quotes('apple', n_results=1)"
real 0m1.094s
user 0m0.824s
sys 0m0.871s |
Reopened this issue since I still need to include some more tests and fix the current build as it failed in the previous commits... 😖 |
It seems that as it happened before with Hopefully the current version I developed for |
Hi @typhoon71, @RamonGuixa and @Fetix, the new release is already out! 🔥 You can already install it using either For more information about this new release, you should check investpy v1.0.7 Release 🎈 |
I will definitely be checking this. thanks a lot in advance. |
I'd like to suggest to add the currency to search result, as the same financial instrument can be present on the same exchange with 2 differenct currencies; i.e. in the case of London, you have quotations in USD and GBP too.
Comparing instruments with different currency it would be something useful to know, so you coud apply the relevant cross.
It would be a great addition to the To the investpy.search_quotes() too.
What do you think about it?
The text was updated successfully, but these errors were encountered: