ooples / OoplesFinance.YahooFinanceAPI

A .NET API wrapper for Yahoo Finance that allows users to get top trending stocks, historical stock data, stock splits, dividends, capital gains, and much much more!
Apache License 2.0
47 stars 10 forks source link

Why don't I get daily prices? #83

Closed MozgC closed 3 months ago

MozgC commented 3 months ago

Hi, just trying your library for the first time and I don't get daily prices, I tried a few different tickers.

var chartInfoList2 = await yahooClient.GetChartInfoAsync("VOO", TimeRange.Max, TimeInterval._1Day);

image

You can see I'm only getting monthly prices.

Here YF does have daily prices: https://finance.yahoo.com/quote/VOO/history?period1=1283990400&period2=1716768000&interval=1d&filter=history&frequency=1d&includeAdjustedClose=true

ooples commented 3 months ago

@MozgC This seems to be a very strange issue with the TimeRange.Max in particular. You can see from my screenshot below that I'm using the 5 year range and I can see the daily values correctly. I also confirmed the max time range directly using Yahoo Finance and I can see that for some reason, the 1 day interval returns the monthly values so this definitely is coming from the Yahoo side of things.

image

MozgC commented 3 months ago

@ooples thank you. I guess I will use 10years then.