Apparently Yahoo Finance does have a empty space in the 15th volume spot. I want to make a program that updates every minute and displays the volume in a chart. Is there a way to retrieve all the volume data ? This is the current code:
from datetime import datetime, timedelta
from pandas_datareader import data as pdr
import yfinance as yfin
yfin.pdr_override()
now = datetime.now()
yesterday = datetime.now() - timedelta(hours=24)
df = pdr.get_data_yahoo(stock_name, start=yesterday, end=now, interval="1m").reset_index(
This is the console output. Do i have to save the 15th volume and paste it in there if 1min passes ? Or is there a more elegant solution ?
195 223359
196 157398
197 158008
198 140398
199 115367
200 125186
201 99746
202 116837
203 78410
204 85128
205 163242
206 0
207 100304
208 72121
209 85434
210 291359
211 160448
212 104333
213 215963
214 144782
215 105991
216 438472
217 256056
218 307365
219 222936
220 201872