ooples / OoplesFinance.StockIndicators

Largest C# stock indicator library with over 750 to choose from and easiest to use with abilities such as making an indicator out of any other indicator or using any moving average with any indicator.
Apache License 2.0
209 stars 54 forks source link

`InvalidOperationException`:`Yahoo Finance Authentication Error` #78

Closed skirk-mpr closed 2 hours ago

skirk-mpr commented 2 hours ago

I just started getting an InvalidOperationException with the message Yahoo Finance Authentication Error when running a LINQPad script leveraging your library that has previously worked for a while (year+). This is happening on the call to GetHistoricalDataAsync() on the YahooClient. I'm guessing that the underlying Yahoo Finance API that you are wrapping is no longer allow anonymous requests, does that seem right? Happy to help try and PR a fix in but just need a little guidance if that assumption is good.

Thanks!

async Task Main()
{
    var historicalDataList = await _client.GetHistoricalDataAsync(fundSymbol, DataFrequency.Daily, startDate);
    var priceData = historicalDataList.Select(i => new SharePriceByDay(i.Date, i.Close));
}
skirk-mpr commented 2 hours ago

Realize this originates from OoplesFinance.YahooFinanceAPI for which there is already an open issue: /issues/91