Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to bruncher,niord,gvonge,Shelford,GrahamPlatt, for Donating to support the site

Yahoo price scrape has failed

Discussions regarding financial software
eventide
2 Lemon pips
Posts: 102
Joined: October 24th, 2017, 3:29 pm
Has thanked: 3 times
Been thanked: 83 times

Re: Yahoo price scrape has failed

#584226

Postby eventide » April 21st, 2023, 10:15 am

There's also streaming data on the yahoo websocket which can be used for hunderds of tickers simultaneously

wss://streamer.finance.yahoo.com/ (this is not a viewable link obvs, its a websocket endpoint)

but you need to decode the inbound protobufs, which is a satisfying challenge.
Trickier still but cherry on the cake is then to expose the streaming prices in excel


The websocket is integrated into how a traditional yahoo finance page for a stock works.
When you call eg https://uk.finance.yahoo.com/quote/VOD.L/
The page calls the v7 or v10 api initially to get ohlc etc
Then it sets up a websocket to continually update the last price and volume details, for very lightwieght data use

spiderbill
Lemon Slice
Posts: 546
Joined: November 4th, 2016, 9:12 am
Has thanked: 157 times
Been thanked: 184 times

Re: Yahoo price scrape has failed

#587275

Postby spiderbill » May 5th, 2023, 9:25 am

Looks like the Yahoo feeds are off again - both my Excel sheet using eventide's add-on and my HYPTUS on Libre Office are failing to return anything. I noticed it was down yesterday evening and it's still down today. Back to Google sheets.....

Itsallaguess
Lemon Half
Posts: 9129
Joined: November 4th, 2016, 1:16 pm
Has thanked: 4140 times
Been thanked: 10032 times

Re: Yahoo price scrape has failed

#587324

Postby Itsallaguess » May 5th, 2023, 12:28 pm

spiderbill wrote:
Looks like the Yahoo feeds are off again - both my Excel sheet using eventide's add-on and my HYPTUS on Libre Office are failing to return anything.

I noticed it was down yesterday evening and it's still down today.


Similar to the last outage, it's worth noting that the v10 Yahoo API is still operating without any issues -

https://www.lemonfool.co.uk/viewtopic.php?f=27&t=38834&hilit=api#p584100

Cheers,

Itsallaguess

csearle
Lemon Quarter
Posts: 4857
Joined: November 4th, 2016, 2:24 pm
Has thanked: 4887 times
Been thanked: 2131 times

Re: Yahoo price scrape has failed

#587356

Postby csearle » May 5th, 2023, 2:53 pm

johnstevens77 wrote:It is working now.

john
Not for me it isn't. :( C.

johnstevens77
Lemon Slice
Posts: 447
Joined: November 9th, 2016, 6:14 pm
Has thanked: 427 times
Been thanked: 149 times

Re: Yahoo price scrape has failed

#587406

Postby johnstevens77 » May 5th, 2023, 6:32 pm

csearle wrote:
johnstevens77 wrote:It is working now.

john
Not for me it isn't. :( C.


That was on April 20th!

It has failed for me too, today, May 5th

john

Jam1
Posts: 29
Joined: November 15th, 2021, 10:03 pm
Has thanked: 14 times
Been thanked: 12 times

Re: Yahoo price scrape has failed

#587443

Postby Jam1 » May 5th, 2023, 10:02 pm

Also failed for me tonight.

staffordian
Lemon Quarter
Posts: 2307
Joined: November 4th, 2016, 4:20 pm
Has thanked: 1909 times
Been thanked: 871 times

Re: Yahoo price scrape has failed

#587447

Postby staffordian » May 5th, 2023, 10:11 pm

Jam1 wrote:Also failed for me tonight.

Same here :(

Itsallaguess
Lemon Half
Posts: 9129
Joined: November 4th, 2016, 1:16 pm
Has thanked: 4140 times
Been thanked: 10032 times

Re: Yahoo price scrape has failed

#587459

Postby Itsallaguess » May 6th, 2023, 6:28 am

staffordian wrote:
Jam1 wrote:
Also failed for me tonight.


Same here ..


I've knocked up a 'rough and ready' VBA routine that will use the still-working and recently more reliable v10 API from Yahoo and scrape prices rapidly for the Excel version of HYPTUSS.

For now, I've inserted an 'Alt Yahoo' button underneath the 'Portfolio Value' top-left area, using the steps shown in the video below from 55 seconds in, until the 3 minute mark -

https://player.vimeo.com/video/707670466

Here's the 'Alt Yahoo' VBA code to use with the above process -

Code: Select all

Private Sub CommandButton17_Click()

Dim lastrow, rowsdown, epic, url_string, http, sResp, price, regexp

Let lastrow = Range("C65536").End(xlUp).Row

' Clear existing price cells so that the user can see the new prices being populated
For rowsdown = 6 To lastrow
    Cells(rowsdown, 5) = ""
Next rowsdown


Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0")

Set regexp = CreateObject("VBScript.RegExp")

For rowsdown = 6 To lastrow

'Set the Epic for the row
epic = Cells(rowsdown, 3)


' Set the Yahoo Finance v10 API URL for the EPIC in each row
Let url_string = "https://query2.finance.yahoo.com/v10/finance/quoteSummary/" & epic & ".l?modules=price"

'Get the Yahoo Finance JSON for the EPIC
With http
    .Open "GET", url_string, False
    .send
    sResp = .responseText
End With
On Error Resume Next


'Find the Yahoo Finance Yield in the returned JSON if it exists
With regexp
        .Pattern = "regularMarketPrice[\s\S]+?fmt"":""(.*?)"""
        If .Execute(sResp).Count > 0 Then
            price = .Execute(sResp)(0).SubMatches(0)
        End If
End With

' Place the v10 API Yahoo share price on the HYP sheet
Cells(rowsdown, 5) = price

Next rowsdown

End Sub


The above process works for the latest version of the HYPTUSS Excel download, and the only check required for anyone wanting to give it a go with an older version is to make a note of the 'CommandButton' number that exists before deleting the two original lines of button code at the 2-minute mark in the above video, and then after pasting in the above VBA code into the VBA Editor, make sure that the first CommandButton number is manually realigned to that same original number. In the above video, we can see that the original CommandButton number is 1, and in the latest version of the HYPTUSS Excel download, it's '17' as replicated in the above VBA code, but it is likely to be a different number in various older versions of the HYPTUSS tool, so just check before and after the copy and paste process that the number is the same as the first line of VBA button-code originally deleted...

The VBA password box is likely to appear at some stage early in the above process, and the open VBA password for HYPTUSS is the usual 'pleaseletmein'

As usual, the above steps are really quite simple for anyone with enough care and patience to follow the steps shown in the video, and I'd welcome any feedback if anyone gives it a go, but please, at first make sure that you work on a recent COPY of your current HYPTUSS file, in case anything un-towards happens during the above process...

Cheers,

Itsallaguess

Laughton
Lemon Slice
Posts: 913
Joined: November 6th, 2016, 2:15 pm
Has thanked: 143 times
Been thanked: 336 times

Re: Yahoo price scrape has failed

#587479

Postby Laughton » May 6th, 2023, 9:39 am

Back to Google sheets.....


Good luck with that - lots of N/As and ERROR messages on my spreadsheet yesterday and again today.

simoan
Lemon Quarter
Posts: 2139
Joined: November 5th, 2016, 9:37 am
Has thanked: 478 times
Been thanked: 1481 times

Re: Yahoo price scrape has failed

#587481

Postby simoan » May 6th, 2023, 9:45 am

Laughton wrote:
Back to Google sheets.....


Good luck with that - lots of N/As and ERROR messages on my spreadsheet yesterday and again today.

I have long suspected the Yahoo price feed may be disabled at some point. Hopefully this outage is temporary rather than permanent. Has anyone got any experience using the STOCKS data type in Excel? This looks potentially interesting to me, even though it would mean subscribing to Office 365.

All the best, Si

Newroad
Lemon Quarter
Posts: 1119
Joined: November 23rd, 2019, 4:59 pm
Has thanked: 17 times
Been thanked: 352 times

Re: Yahoo price scrape has failed

#587503

Postby Newroad » May 6th, 2023, 11:31 am

Hi Simoan.

It's pretty easy in Excel.

You type in the stock (epic) code into a cell then press "Stocks" from the "Data Types" section of the "Data" ribbon and it populates it with the full name. Ideally, put in XLON before the epic code, e.g. "XLON:SHEL" in case there is a duplicate epic on a different exchange.

Then, when you hover over the name, a little tab appears which you can choose what information you want - which as far as I can tell populates the next free column.

It's certainly saved me much time from updating - and I can't recall it failing.

Regards, Newroad

genou
Lemon Quarter
Posts: 1103
Joined: November 4th, 2016, 1:12 pm
Has thanked: 179 times
Been thanked: 377 times

Re: Yahoo price scrape has failed

#587506

Postby genou » May 6th, 2023, 11:39 am

simoan wrote:Has anyone got any experience using the STOCKS data type in Excel?

All the best, Si


What do you want to know? It works, but the universe it covers is restricted - no corporate bonds for example. I doubt it will do gilts either. It does do exchange rates.

mc2fool
Lemon Half
Posts: 7970
Joined: November 4th, 2016, 11:24 am
Has thanked: 7 times
Been thanked: 3071 times

Re: Yahoo price scrape has failed

#587509

Postby mc2fool » May 6th, 2023, 12:13 pm

Itsallaguess wrote:
spiderbill wrote:
Looks like the Yahoo feeds are off again - both my Excel sheet using eventide's add-on and my HYPTUS on Libre Office are failing to return anything.

I noticed it was down yesterday evening and it's still down today.


Similar to the last outage, it's worth noting that the v10 Yahoo API is still operating without any issues -

https://www.lemonfool.co.uk/viewtopic.php?f=27&t=38834&hilit=api#p584100

Cheers,

Itsallaguess

Rather curiously, so is the v6 API still working ok, so for those that want it's just a one character change, and still works for multiple stocks... ;)

https://query1.finance.yahoo.com/v6/finance/quote?symbols=GOOG,AAPL

spiderbill
Lemon Slice
Posts: 546
Joined: November 4th, 2016, 9:12 am
Has thanked: 157 times
Been thanked: 184 times

Re: Yahoo price scrape has failed

#587516

Postby spiderbill » May 6th, 2023, 1:08 pm

Laughton wrote:Good luck with that - lots of N/As and ERROR messages on my spreadsheet yesterday and again today.


Yes, I have three doing that in my portfolio this time round (CSN, UKW, NESF). Strange as they were all working when I set it up the other week.

cheers
Spiderbill

staffordian
Lemon Quarter
Posts: 2307
Joined: November 4th, 2016, 4:20 pm
Has thanked: 1909 times
Been thanked: 871 times

Re: Yahoo price scrape has failed

#587535

Postby staffordian » May 6th, 2023, 3:15 pm

Itsallaguess wrote:I've knocked up a 'rough and ready' VBA routine that will use the still-working and recently more reliable v10 API from Yahoo and scrape prices rapidly for the Excel version of HYPTUSS.

For now, I've inserted an 'Alt Yahoo' button underneath the 'Portfolio Value' top-left area, using the steps shown in the video below from 55 seconds in, until the 3 minute mark -

https://player.vimeo.com/video/707670466

Here's the 'Alt Yahoo' VBA code to use with the above process -


Many thanks for doing this, it worked a treat.

The update did take longer, and Excel reported "Not responding" for the best part of a minute, but then filled all the prices almost simultaneously.

ReformedCharacter
Lemon Quarter
Posts: 3153
Joined: November 4th, 2016, 11:12 am
Has thanked: 3687 times
Been thanked: 1530 times

Re: Yahoo price scrape has failed

#587539

Postby ReformedCharacter » May 6th, 2023, 3:26 pm

spiderbill wrote:
Laughton wrote:Good luck with that - lots of N/As and ERROR messages on my spreadsheet yesterday and again today.


Yes, I have three doing that in my portfolio this time round (CSN, UKW, NESF). Strange as they were all working when I set it up the other week.

cheers
Spiderbill

I've been using Google Sheets for some years for my portfolio valuations and as you mention certain shares fail sometimes. I had 3 prices that returned an error on Friday. Usually it doesn't last long, hopefully it will be back to normal next week.

RC

mc2fool
Lemon Half
Posts: 7970
Joined: November 4th, 2016, 11:24 am
Has thanked: 7 times
Been thanked: 3071 times

Re: Yahoo price scrape has failed

#587548

Postby mc2fool » May 6th, 2023, 4:19 pm

staffordian wrote:
Itsallaguess wrote:I've knocked up a 'rough and ready' VBA routine that will use the still-working and recently more reliable v10 API from Yahoo and scrape prices rapidly for the Excel version of HYPTUSS.

For now, I've inserted an 'Alt Yahoo' button underneath the 'Portfolio Value' top-left area, using the steps shown in the video below from 55 seconds in, until the 3 minute mark -

https://player.vimeo.com/video/707670466

Here's the 'Alt Yahoo' VBA code to use with the above process -

Many thanks for doing this, it worked a treat.

The update did take longer, and Excel reported "Not responding" for the best part of a minute, but then filled all the prices almost simultaneously.

As I say above, the v6 API is still working and, like the v7 API, allows for the info for multiple stocks to be fetched in one go, so zips along to the point of being almost instant. All that's needed is to change occurrences of:

https://query1.finance.yahoo.com/v7/finance/quote... to
https://query1.finance.yahoo.com/v6/finance/quote...

(I don't know the setup for HYPTUSS but it looks from Itsallaguess's code that the query string may be hardwired in the code. In my spreadsheets I have the query string in a named cell in a "Parameters" sheet so such changes are trivially easy...)

simoan
Lemon Quarter
Posts: 2139
Joined: November 5th, 2016, 9:37 am
Has thanked: 478 times
Been thanked: 1481 times

Re: Yahoo price scrape has failed

#587554

Postby simoan » May 6th, 2023, 4:49 pm

genou wrote:
simoan wrote:Has anyone got any experience using the STOCKS data type in Excel?

All the best, Si


What do you want to know? It works, but the universe it covers is restricted - no corporate bonds for example. I doubt it will do gilts either. It does do exchange rates.

Thank you. I assumed it worked OK and was more interested in what level of data was provided, and if any data available on Yahoo is not available in Excel. My spreadsheet contains a lot of data available on Yahoo, including currency exchange rates, global stock market indices and commodity prices. On the equities front, I invest a lot in UK small caps and so would be interested in how well AIM listed companies are supported, for instance? Given the data is sourced from Refinitiv I would assume UK stocks have good data coversge.

All the best, Si

Arborbridge
The full Lemon
Posts: 10525
Joined: November 4th, 2016, 9:33 am
Has thanked: 3676 times
Been thanked: 5320 times

Re: Yahoo price scrape has failed

#587563

Postby Arborbridge » May 6th, 2023, 6:14 pm

Yahoo/Hyptuss is not working for me either, though it did last weekend.

I've skimmed through this thread, but most of it is in a foreign language to me - so is this something which will rectify itself, something I can fix myself, or an event where a new version of HYptuss will provide succour for idiots like me?

Arb.

Urbandreamer
Lemon Quarter
Posts: 3241
Joined: December 7th, 2016, 9:09 pm
Has thanked: 364 times
Been thanked: 1070 times

Re: Yahoo price scrape has failed

#587568

Postby Urbandreamer » May 6th, 2023, 6:43 pm

Arborbridge wrote:Yahoo/Hyptuss is not working for me either, though it did last weekend.

I've skimmed through this thread, but most of it is in a foreign language to me - so is this something which will rectify itself, something I can fix myself, or an event where a new version of HYptuss will provide succour for idiots like me?

Arb.


My problem is that it assumes you are using the excel version, which I'm not. Were the code to be python for the libreoffice version I'm sure that I could make the code changes.

To me it sounds like it won't rectify itself, though our kindly developers will eventually try to produce a fix. Unfortunately it sounds like we are unlikely to get a quick fix as the excel "fixes" are just patches bound to fail soon.

At the end of the day, they are dependent upon others. Principally Yahoo.


Return to “Financial Software - Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests