How to obtain ETF data? #399
-
(1) VIG is a US ETF available at investing.com. But the following error is displayed: ERR#0034: country " + country.lower() + " not found (2) Likewise HCON is a Canadian ETF, with a similar error. Is there a special way to request ETF data? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @yuselg this is weird... 😖 I'll have a look at it later today so as to provide you a more detailed answer as that functions should work as long as the data is available in the static CSV files of Here's a usage example: import investpy
search_result = investpy.search_quotes(text='VIG', products=['etfs'], countries=['united states'], n_results=1)
print(search_result)
recent_data = search_result.retrieve_recent_data()
historical_data = search_result.retrieve_historical_data(from_date='01/01/2019', to_date='01/01/2020')
information = search_result.retrieve_information()
default_currency = search_result.retrieve_currency()
technical_indicators = search_result.retrieve_technical_indicators(interval='daily') For more information please visit the documentation of |
Beta Was this translation helpful? Give feedback.
Hi @yuselg this is weird... 😖 I'll have a look at it later today so as to provide you a more detailed answer as that functions should work as long as the data is available in the static CSV files of
investpy
, but anyway, just as a fix/workaround you can useinvestpy.search_quotes
function which uses the Investing.com search engine 👍Here's a usage example: