Yahoo Finance doesn't show pre-market and after-hours prices by default in its standard quote endpoints. However, you can access extended trading session data by using Yahoo Finance's chart API and enabling pre-post market flags.

The most reliable method is to query the chart endpoint with the include prepost=True parameter set to true. This allows you to retrieve candles and last prices from extended sessions.

Example using requests in Python:

import yfinance as yf
from datetime import date, timedelta

today = date.today()
day = today - timedelta(days=7)


symbol = 'AAPL'


df2 = yf.download(symbol, start=day.strftime('%Y-%m-%d'), end=today, interval='1m', prepost=True)#

result is data frame with last N days (max 8 days):

Price Close High Low Open Volume
Ticker AAPL AAPL AAPL AAPL AAPL
Datetime
2026-01-23 09:00:00+00:00 248.60 248.75 248.60 248.70 0
2026-01-23 09:01:00+00:00 248.62 248.63 248.62 248.63 0
2026-01-23 09:02:00+00:00 248.55 248.64 248.55 248.64 0
2026-01-23 09:07:00+00:00 248.64 248.74 248.64 248.74 0
2026-01-23 09:10:00+00:00 248.60 248.64 248.60 248.64 0

when the volume is:

  • 0 - it's after-hours prices
  • non zero - then is normal trading price

Key tips:

  • Set prepost=True
  • max 8 days
  • Use 1m or 5m intervals for best extended session visibility
  • The regular quote endpoint may NOT reflect after-hours prices
  • Double check the info from another source

Note: If you need consistent extended-hours access, consider official market data APIs, as Yahoo Finance is unofficial and may change behavior.