Closed KapsTrvl closed 1 year ago
I've already checked and it seems it's not due to the timezone conversion to UTC, I can also see data for 10/08/2022
while it shouldn't as your correctly pointing out @KapsTrvl, but I'll explore the issue further as the API that we're using is https://tvc4.investing.com/ not Investing.com defaults API, so the results may vary from the ones shown in the website... Anyway I'll explore this further and come back with an answer ASAP :hugs:
Ok, it seems that all the dates are being shifted by one day when transforming the timestamps into datetime
objects so I'll keep on exploring that... See that the screenshot below shows the retrieved dates as well as the close value, compared to the ones available at Investing.com, there seems to be a 1-day difference.
Ok this is directly related to the timezone conversion done internally by Investing.com so that the results are presented in the timezone they operate, not in UTC format, so I've got a way to fix that, so consider this to be done later today, and investiny v0.7.0
to be released!
@KapsTrvl make sure to install the latest release as pip install investiny --upgrade
and the following code should work fine!
from investiny import historical_data
data = historical_data(investing_id=23705, from_date="10/04/2022", to_date="10/14/2022")
print(data["date"])
Opening new ticket per #31 @alvarobartt
Historical price query for US10Y returning incorrect Date and Price mapping. Getting weekend date 10/08/22 (Sat) and missing 10/10/22(Mon) per the following -
![image](https://user-images.githubusercontent.com/73245978/196004660-4b722f07-5a96-45c5-8470-6bfe52122819.png)
Thanks for looking into this.