Missing BTC-USD when time zone and exchange time zone are on different days #1669
-
Hello, I've been trying to fix a problem with regards to downloading cryptocurrency exchange data. My program stops working correctly for 4 hours every day (and it's the best 4 hours, immediately once prices for a day are finalized). For example, If I want to get data for today and 2 days previous, and today is the 31st, when the time zones are on the same day, I get data from the 31st, 30th, and 29th. If the time is such that I'm on day 30th, the exchange is on 31st, I won't get data for the 30th, it will be missing. If I get the data as hourly instead of daily, there is no missing data. Here's what I get when the dates don't match The hourly is OK Here is my code approximately, I am on Eastern time, the exchange is on UTC: from datetime import datetime, timedelta, timezone aaveusd_obj = yf.Ticker('AAVE-USD') datetimenow_eastcoast = datetime.now(timezone.utc) - timedelta(days = 0, hours=0, minutes = 0) aaveusd_obj_data = aaveusd_obj.history(interval='1d', start=datetimestart, end=datetimenow) print(aaveusd_obj_data) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
What exactly is the problem?
And tip: let |
Beta Was this translation helpful? Give feedback.
-
Here's a picture of a window I have open from last night, you'll notice August 30th is missing, and I have the page inspected, and the console tab says I have "ERR_CERT_DATE_INVALID. I don't know exactly what that means, but I suspect that's my problem. I don't know how to repair my computer. There are browser extensions that say they can fix it, but really I think that's the wrong way, although I am using that now |
Beta Was this translation helpful? Give feedback.
-
The problem is almost-certainly Yahoo despite your malware adventure #925 Maybe |
Beta Was this translation helpful? Give feedback.
The problem is almost-certainly Yahoo despite your malware adventure #925
Maybe
history(repair=True)
can fix it? If not, now you got a real adventure.