alvarobartt / investpy

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

Error retrieving fund data for isin=PTYCXRLP0000 #417

Open cgeraldes opened 3 years ago

cgeraldes commented 3 years ago

The code below retrieves the expected information

import investpy search_result1 = investpy.search_quotes(text='PTYCXRLP0000', products=['funds'],countries=['portugal'], n_results=1) print(search_result1) search_result2 = investpy.search_quotes(text='PTCXGUHM0006', products=['funds'],countries=['portugal'], n_results=1) print(search_result2)

Resuts are:

{"id_": 1170279, "name": "Caixa Sele\u00e7\u00e3o Global Arrojado - Fundo De Investimento Mobili\u00e1rio Aberto", "symbol": "0P00000SZ7", "country": "portugal", "tag": "/funds/ptycxrlp0000", "pairtype": "funds", "exchange": "Lisbon"} {"id": 1158776, "name": "Caixa A\u00e7\u00f5es L\u00edderes Globais - Fundo De Investimento Mobili\u00e1rio Aberto De A\u00e7\u00f5es", "symbol": "0P0000ZFDE", "country": "portugal", "tag": "/funds/ptcxguhm0006", "pair_type": "funds", "exchange": "Lisbon"}

However

search_result2.retrieve_historical_data(from_date="01/01/2017", to_date="31/12/2020")

retrieves the expected results but

search_result2.retrieve_historical_data(from_date="01/01/2017", to_date="31/12/2020")

does not. What can I do to solve that?

Thanks in advance

Carlos Geraldes