ClimberMel / SMF_Add-in

Stock Market Functions for Excel using VBA
https://climbermel.github.io/SMF_Add-in/
14 stars 5 forks source link

smfGetOptionExpirations not getting data #58

Closed ClimberMel closed 3 days ago

ClimberMel commented 5 months ago

I'm not getting any data from =smfGetOptionExpirations for any tickers. Was working yesterday. The function uses the following code:

'------------------> Yahoo processing after 2017-03-15

Source_Yahoo: Dim vFirst As Variant, vNext As Variant sURL = "https://query1.finance.yahoo.com/v7/finance/options/" & UCase(pTicker) s1 = smfStrExtr(RCHGetWebData(sURL, """expirationDates"":[", 500), "[", "]") vFirst = Int(smfUnix2Date(smfWord(s1, 1, ",", 1))) iPtr = 0 ... etc

"https://query1.finance.yahoo.com/v7/finance/options/" is the source but if I put that into my browser with a ticker it returns "invalid crumb". If I add a valid crumb to the end of the url I still get an "invalid crumb" msg.

Anyone else having problems with this function?

~ Bruce S

ClimberMel commented 5 months ago

Solved. Mel, attached are the code changes for =smfGetOptionExpirations and =smfGetOptionStrikes.