yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

Inconsistent results with download() and history() functions

Open dpizzle opened this issue 3 years ago • 3 comments

When running the below commands, data is only returned when the request is sent to certain Yahoo hosts.

I am running yfinance (0.1.69)

Not working

This is when the requests are sent to 87.248.114.11:443 or 87.248.114.12:443 as per tcpdump.

>>> yf.Ticker('0UW4.L').history()
- 0UW4.L: None
Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: []

Working

This is when the requests are sent to 69.147.82.60:443 or 69.147.82.61:443 as per tcpdump.

>>> yf.Ticker('0UW4.L').history()
            Open  High   Low  Close  Volume  Dividends  Stock Splits
Date
2022-01-12  0.92  0.92  0.92   0.92    2000          0             0

The requests from the history() and download() commands appear to use the 4 Yahoo IP addresses, so the output from the command is inconsistent.

dpizzle avatar Jan 12 '22 21:01 dpizzle

Thank you, I am facing similar questions. But how to change the right Yahoo IP addresses.

yinjin1314 avatar Jan 26 '22 02:01 yinjin1314

Use interpolation to fix

asafravid avatar Jan 26 '22 06:01 asafravid

Does this still happen in latest version?

ValueRaider avatar Mar 14 '24 21:03 ValueRaider