alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

Fail to retrieve all requested etfs #2800 (Tracker Fund of Hong Kong) #571

Open loongfw opened 2 years ago

loongfw commented 2 years ago

Hello, I can't find data of 2800 (Tracker Fund of Hong Kong) using the following command. Thank you. (version of investpy =1.0.8)

df = investpy.etf.get_etf_historical_data(etf='Tracker Fund of Hong Kong', country='Hong Kong', from_date='01/01/2019', to_date='01/01/2022')


AttributeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_9964/1566267921.py in ----> 1 df = investpy.etf.get_etf_historical_data(etf='Tracker Fund of Hong Kong', country='Hong Kong', from_date='01/01/2019', to_date='01/01/2022') 2 print(df.head())

AttributeError: module 'investpy' has no attribute 'etf'

-----------------------OR------------------------------

df = investpy.etf.get_etf_historical_data(etf='2800', country='Hong Kong', from_date='01/01/2019', to_date='01/01/2022')


AttributeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_9964/412728324.py in ----> 1 df = investpy.etf.get_etf_historical_data(etf='2800', country='Hong Kong', from_date='01/01/2019', to_date='01/01/2022') 2 print(df.head())

AttributeError: module 'investpy' has no attribute 'etf'


Besides, I have used the search function to find out the stock symbol:

search_result = investpy.search_quotes(text='', products=['etfs'], countries=['Hong Kong'], n_results=1) print(search_result)

OUT: {"id_": 985881, "name": "Tracker Fund of Hong Kong", "symbol": "2800", "country": "hong kong", "tag": "/etfs/tracker-fund-of-hong-kong", "pair_type": "etfs", "exchange": "Hong Kong"}