Open andresrogers opened 2 years ago
Hi @andresrogers, where are you retrieving those IDs from? If those are being retrieved from investpy
static files, just to let you know that those files are not consistent as those were statically generated some time ago, and have potentially changed. So the available data there may not be the actual one.
Anyway, let me know the Investing.com URL of the asserts corresponding to the investing_id=29490
and investing_id=40654
IDs so as to explore the issue further.
Thanks! ππ»
The ones that gave me an error are:
investing_id=26490 is META
search_assets(query="META", limit=1) {'symbol': 'META', 'full_name': 'NASDAQ:META', 'description': 'Meta Platforms Inc', 'type': 'Stock', 'ticker': '26490', 'exchange': 'NASDAQ'}
investing_id=40654 is TLT
search_assets(query="TLT", limit=1) {'symbol': 'TLT', 'full_name': 'NASDAQ:TLT', 'description': 'iShares 20+ Year Treasury Bond ETF', 'type': 'ETF', 'ticker': '40654', 'exchange': 'NASDAQ'},
It only gave me that error if I used '04/27/2000' as starting date, didn't get the error for less than 10 years difference to current date.
Ok @andresrogers let me try and I'll come back to you with a response ππ» But I assume it may have something to do with #24 as it just happens whenever you use too distant dates.
open high low close
date 2012-05-18 42.049999 45.000000 38.000000 38.230000 2012-05-21 36.529999 36.660000 33.000000 34.029999 2012-05-22 32.610001 33.590000 30.940001 31.000000 2012-05-23 31.370001 32.500000 31.360001 32.000000 2012-05-24 32.950001 33.209999 31.770000 33.029999 ... ... ... ... ... 2022-10-04 140.490005 142.390106 139.339996 140.279999 2022-10-05 138.240005 140.210007 134.779999 138.979996 2022-10-06 137.714996 141.449997 136.600006 139.070007 2022-10-07 136.759995 138.289993 132.440002 133.449997 2022-10-10 133.550003 135.940002 132.800003 134.100006
it gave error because this api doesnt have 2012-05-18 before data this stock
it gave error because this api doesnt have 2012-05-18 before data this stock
I thought something of the sort, but I believe the expected behaviour should be to return the earliest possible data without giving an error.
Thanks for posting that @ramakrishnamekala129, and yes, @andresrogers, the expected behavior is not to fail, so I'll check it and come back with a response ASAP :+1:
it gave error because this api doesnt have 2012-05-18 before data this stock
I thought something of the sort, but I believe the expected behaviour should be to return the earliest possible data without giving an error.
We should be creating a separate issue for this once the new version is released! π
For some ids, historical_data gives this error:
historical_data(investing_id=40654,from_date=start_date_1, to_date=end_date_1)
also
historical_data(investing_id=26490,from_date=start_date_1, to_date=end_date_1)
for dates: start_date_1 = '04/27/2000' end_date_1 = '04/26/2012'