Missing 5 min interval data when prepost is set to True #1892
Replies: 4 comments
-
Not a bug. It's no data from Yahoo between 1701699000 and 1701700200 for 5m interval. |
Beta Was this translation helpful? Give feedback.
-
ok. So Yahoo is not a reliable data source for: Can this be added to the home page? Thanks! |
Beta Was this translation helpful? Give feedback.
-
See terms of use from Yahoo. Try to use special paid services such as alphavantage, twelvedata, finnhub, etc |
Beta Was this translation helpful? Give feedback.
-
I support linking to a Wiki page of confirmed Yahoo issues. E.g. this, I can see Yahoo's NASDAQ charts also missing 15m pre-open. |
Beta Was this translation helpful? Give feedback.
-
Describe bug
Some of the 5m (5m interval /1day period) candles are missing e.g. 9:15, 9:20, 9:25 candles are missing when prepost is set to true.
Simple code that reproduces your problem
Debug log
D:\Apps\Python\python.exe D:\pyproj\tradepkg\tradeSvc\pythonTest.py
Yahoo Test Start*
DEBUG:yfinance:Entering download()
DEBUG:yfinance:Disabling multithreading because DEBUG logging enabled
DEBUG:yfinance: Entering history()
DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "_kv" ("key" VARCHAR(255) NOT NULL PRIMARY KEY, "value" VARCHAR(255)) WITHOUT ROWID', [])
DEBUG:peewee:('SELECT "t1"."key", "t1"."value" FROM "_kv" AS "t1" WHERE ("t1"."key" = ?) LIMIT ? OFFSET ?', ['TSLA', 1, 0])
DEBUG:yfinance:TSLA: Yahoo GET parameters: {'range': '1d', 'interval': '5m', 'includePrePost': True, 'events': 'div,splits,capitalGains'}
DEBUG:yfinance: Entering get()
DEBUG:yfinance:url=https://query2.finance.yahoo.com/v8/finance/chart/TSLA
DEBUG:yfinance:params={'range': '1d', 'interval': '5m', 'includePrePost': True, 'events': 'div,splits,capitalGains'}
DEBUG:yfinance: Entering _get_cookie_and_crumb()
DEBUG:yfinance:cookie_mode = 'basic'
DEBUG:yfinance: Entering _get_cookie_and_crumb_basic()
DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "_cookieschema" ("strategy" VARCHAR(255) NOT NULL PRIMARY KEY, "fetch_date" DATETIME NOT NULL, "cookie_bytes" BLOB NOT NULL) WITHOUT ROWID', [])
DEBUG:peewee:('SELECT "t1"."strategy", "t1"."fetch_date", "t1"."cookie_bytes" FROM "_cookieschema" AS "t1" WHERE ("t1"."strategy" = ?) LIMIT ? OFFSET ?', ['basic', 1, 0])
DEBUG:yfinance:loaded persistent cookie
DEBUG:yfinance:reusing cookie
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): query1.finance.yahoo.com:443
DEBUG:urllib3.connectionpool:https://query1.finance.yahoo.com:443 "GET /v1/test/getcrumb HTTP/1.1" 200 None
DEBUG:yfinance:crumb = 'Sqq6A8Fa6a9'
DEBUG:yfinance: Exiting _get_cookie_and_crumb_basic()
DEBUG:yfinance: Exiting _get_cookie_and_crumb()
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): query2.finance.yahoo.com:443
DEBUG:urllib3.connectionpool:https://query2.finance.yahoo.com:443 "GET /v8/finance/chart/TSLA?range=1d&interval=5m&includePrePost=True&events=div%2Csplits%2CcapitalGains&crumb=Sqq6A8Fa6a9 HTTP/1.1" 200 1523
DEBUG:yfinance: Exiting get()
DEBUG:yfinance:TSLA: yfinance received OHLC data: 2023-12-04 09:00:00 -> 2023-12-04 15:14:42
DEBUG:yfinance:TSLA: OHLC after cleaning: 2023-12-04 04:00:00-05:00 -> 2023-12-04 10:10:00-05:00
DEBUG:yfinance:TSLA: OHLC after combining events: 2023-12-04 04:00:00-05:00 -> 2023-12-04 10:10:00-05:00
DEBUG:yfinance:TSLA: yfinance returning OHLC: 2023-12-04 04:00:00-05:00 -> 2023-12-04 10:10:00-05:00
DEBUG:yfinance: Exiting history()
DEBUG:yfinance:Exiting download()
Open High Low Close Adj Close Volume
Datetime
2023-12-04 08:20:00-05:00 237.836800 237.840000 237.251800 237.305000 237.305000 0
2023-12-04 08:25:00-05:00 237.250000 237.500000 237.060000 237.190000 237.190000 0
2023-12-04 08:30:00-05:00 237.110000 237.200000 236.900000 236.930000 236.930000 0
2023-12-04 08:35:00-05:00 236.920000 237.000000 236.250000 236.350000 236.350000 0
2023-12-04 08:40:00-05:00 236.350000 236.400000 235.880000 235.970000 235.970000 0
2023-12-04 08:45:00-05:00 235.940000 236.000000 235.510000 235.610000 235.610000 0
2023-12-04 08:50:00-05:00 235.600400 235.941100 235.560000 235.850000 235.850000 0
2023-12-04 08:55:00-05:00 235.894000 236.010000 235.660000 235.790000 235.790000 0
2023-12-04 09:00:00-05:00 235.870000 236.000000 235.480000 235.580000 235.580000 0
2023-12-04 09:05:00-05:00 235.580000 235.600000 235.220000 235.410000 235.410000 0
2023-12-04 09:10:00-05:00 235.401500 235.560000 235.200000 235.320000 235.320000 0
2023-12-04 09:30:00-05:00 235.750000 237.089996 234.919998 236.737000 236.737000 5822733
2023-12-04 09:35:00-05:00 236.795807 237.380005 234.679993 236.720001 236.720001 3626119
2023-12-04 09:40:00-05:00 236.714005 237.709900 235.830002 235.949997 235.949997 2811404
2023-12-04 09:45:00-05:00 235.971207 237.800003 235.830002 237.600006 237.600006 2358218
2023-12-04 09:50:00-05:00 237.578201 239.199997 236.820007 238.440002 238.440002 2639402
2023-12-04 09:55:00-05:00 238.419693 239.130005 237.570007 237.830002 237.830002 1578202
2023-12-04 10:00:00-05:00 237.899994 239.369507 235.606400 238.570007 238.570007 2253431
2023-12-04 10:05:00-05:00 238.559006 238.739899 237.150604 237.250107 237.250107 1855708
2023-12-04 10:10:00-05:00 237.250000 237.970001 236.570007 236.880005 236.880005 1450914
Yahoo Test ENd*
Bad data proof
Datetime
2023-12-04 08:20:00-05:00 237.836800 237.840000 237.251800 237.305000 237.305000 0
2023-12-04 08:25:00-05:00 237.250000 237.500000 237.060000 237.190000 237.190000 0
2023-12-04 08:30:00-05:00 237.110000 237.200000 236.900000 236.930000 236.930000 0
2023-12-04 08:35:00-05:00 236.920000 237.000000 236.250000 236.350000 236.350000 0
2023-12-04 08:40:00-05:00 236.350000 236.400000 235.880000 235.970000 235.970000 0
2023-12-04 08:45:00-05:00 235.940000 236.000000 235.510000 235.610000 235.610000 0
2023-12-04 08:50:00-05:00 235.600400 235.941100 235.560000 235.850000 235.850000 0
2023-12-04 08:55:00-05:00 235.894000 236.010000 235.660000 235.790000 235.790000 0
2023-12-04 09:00:00-05:00 235.870000 236.000000 235.480000 235.580000 235.580000 0
2023-12-04 09:05:00-05:00 235.580000 235.600000 235.220000 235.410000 235.410000 0
2023-12-04 09:10:00-05:00 235.401500 235.560000 235.200000 235.320000 235.320000 0
2023-12-04 09:30:00-05:00 235.750000 237.089996 234.919998 236.737000 236.737000 5822733
2023-12-04 09:35:00-05:00 236.795807 237.380005 234.679993 236.720001 236.720001 3626119
2023-12-04 09:40:00-05:00 236.714005 237.709900 235.830002 235.949997 235.949997 2811404
2023-12-04 09:45:00-05:00 235.971207 237.800003 235.830002 237.600006 237.600006 2358218
2023-12-04 09:50:00-05:00 237.578201 239.199997 236.820007 238.440002 238.440002 2639402
2023-12-04 09:55:00-05:00 238.419693 239.130005 237.570007 237.830002 237.830002 1578202
2023-12-04 10:00:00-05:00 237.899994 239.369507 235.606400 238.570007 238.570007 2253431
2023-12-04 10:05:00-05:00 238.559006 238.739899 237.150604 237.250107 237.250107 1855708
2023-12-04 10:10:00-05:00 237.250000 237.970001 236.570007 236.880005 236.880005 1450914
yfinance
version0.2.32
Python version
3.11.6
Operating system
Windows 10
Beta Was this translation helpful? Give feedback.
All reactions