HWZ Forums

Login Register FAQ Mark Forums Read

What alternatives after Yahoo Finance stops intra-day stock quotes?

Like Tree10Likes
Reply
 
LinkBack Thread Tools
Old 12-11-2017, 01:55 AM   #46
Master Member
 
Join Date: Apr 2003
Posts: 4,485
can you give an example of the working strings? i tried many combo but didnt work like that 1 below since :SP is not needed.

=IMPORTXML("http://www.bloomberg.com/quote/"M1","//div[@class='price']")
I tested this one.
=IMPORTXML(ʺhttp://www.bloomberg.com/quote/M1:SPʺ,ʺ//span[@class='priceText__1853e8a5']ʺ)

This http://www.bloomberg.com/quote/M1:SP should take you to the Bloomberg M1 price page. Right click on the price and select Inspect Element and you should be able to see the price in span class.

Use Google Finance instead as the stock code is same as SGX.
=ImportXML(ʺhttp://www.google.com/finance?q=SGX:Z74ʺ,ʺ//span[@class='pr']ʺ)

For some unknown reason, you cannot cut & paste the formula from this forum into Google sheet. You must retype into your Google sheet.

Excel macro to download Yahoo Finance stock price. For SGX stock code, must add ".SI" at the end of symbol.

Sub yahoo()
'Ticker symbol starts from row 2 of column A of Sheet1
'Price of corresponding ticker is in column B

ThisWorkbook.Sheets("Sheet1").Cells(1, 1) = "Ticker"
ThisWorkbook.Sheets("Sheet1").Cells(1, 1) = "Price"

' open IE, navigate to the website of interest and loop until fully loaded

For i = 2 To ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Set IE = CreateObject("InternetExplorer.Application")
my_url = "https://finance.yahoo.com/quote/" & ThisWorkbook.Sheets("Sheet1").Cells(i, 1) & "?p=" & ThisWorkbook.Sheets("Sheet1").Cells(i, 1)

With IE
.Visible = False
.navigate my_url
.Top = 50
.Left = 530
.Height = 400
.Width = 400

Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop
End With

ThisWorkbook.Sheets("Sheet1").Cells(i, 2) = IE.document.getElementById("quote-header-info").getElementsByTagName("span")(3).innerText

IE.Quit
Set IE = Nothing
Next i

End Sub

Last edited by peterchan75; 12-11-2017 at 03:43 PM..
peterchan75 is offline   Reply With Quote
Old 12-11-2017, 03:23 AM   #47
Supremacy Member
 
apriliasiao's Avatar
 
Join Date: Dec 2001
Posts: 6,402
siew man got it working now.. can explain why class='priceText__1853e8a5' where else bobbytkc is using class='price'?
apriliasiao is offline   Reply With Quote
Old 12-11-2017, 03:32 AM   #48
High Supremacy Member
 
Perisher's Avatar
 
Join Date: Jan 2015
Posts: 49,040
I tested this one.
=IMPORTXML(ʺhttp://www.bloomberg.com/quote/M1:SPʺ,ʺ//span[@class='priceText__1853e8a5']ʺ)

This http://www.bloomberg.com/quote/M1:SP should take you to the Bloomberg M1 price page. Right click on the price and select Inspect Element and you should be able to see the price in span class.

Use Google Finance instead as the stock code is same as SGX.
=ImportXML(ʺhttp://www.google.com/finance?q=SGX:Z74ʺ,ʺ//span[@class='pr']ʺ)

For some unknown reason, you cannot cut & paste the formula from this forum into Google sheet. You must retype into your Google sheet.
Not sure if it's related but google finance is gonna revamp by mid-Nov so it might be down for a long time.
__________________
Perisher is online now   Reply With Quote
Old 12-11-2017, 10:06 AM   #49
Master Member
 
Join Date: Apr 2003
Posts: 4,485
siew man got it working now.. can explain why class='priceText__1853e8a5' where else bobbytkc is using class='price'?
Sorry, I can't explain. Inspect Element on the price number clearly point to the class tag.
peterchan75 is offline   Reply With Quote
Old 12-11-2017, 10:12 AM   #50
Master Member
 
Join Date: Apr 2003
Posts: 4,485
Not sure if it's related but google finance is gonna revamp by mid-Nov so it might be down for a long time.
I suspect this forum attach some hidden characters that Google sheet cannot digest when we cut & paste from this forum to Google sheet. If Google go by the Yahoo way, importxml will not work in the future.
peterchan75 is offline   Reply With Quote
Old 14-11-2017, 11:08 AM   #51
Senior Member
 
Join Date: Apr 2008
Posts: 1,045
Actually created this intraday charting site for personal usage.
see if anyone find this useful

http://jaic.ga/
__________________
liesx
beisong is offline   Reply With Quote
Old 16-11-2017, 08:42 AM   #52
Supremacy Member
 
apriliasiao's Avatar
 
Join Date: Dec 2001
Posts: 6,402
thanks all for the help. manage to dump all yahoo in place of WSJ and Bloomberg quotes.
apriliasiao is offline   Reply With Quote
Old 16-11-2017, 11:33 AM   #53
Arch-Supremacy Member
 
Join Date: Apr 2010
Posts: 11,840
i may have missed out some investment secret.. can anyone explain to me why must use so many pattern to see stock quote?

i thought your broking house should provide you platform to see stock quote?
TinyPocoyo is offline   Reply With Quote
Old 16-11-2017, 07:39 PM   #54
Member
 
Join Date: Feb 2004
Posts: 399
i may have missed out some investment secret.. can anyone explain to me why must use so many pattern to see stock quote?

i thought your broking house should provide you platform to see stock quote?
For me, it's to see the value of my investments at a single place without having to key in the stock prices. I only go to broker site only once in a while and only to trade
angtc11 is offline   Reply With Quote
Old 17-11-2017, 04:59 PM   #55
Supremacy Member
 
apriliasiao's Avatar
 
Join Date: Dec 2001
Posts: 6,402
ya. all key in siew siew in portfolio so cant auto calculate all profits/loss.
apriliasiao is offline   Reply With Quote
Old 17-11-2017, 08:16 PM   #56
Master Member
 
Tornesoul's Avatar
 
Join Date: Nov 2008
Posts: 3,255
hey guys, ive been using the Singapore Stock Viewer app on my hp to see daily prices. It stopped working after yahoo finance stopped.

Any alternatives u guys r using that r still working?
Tornesoul is online now   Reply With Quote
Old 08-01-2018, 05:04 PM   #57
Senior Member
 
Join Date: Nov 2000
Posts: 1,387
I suspect this forum attach some hidden characters that Google sheet cannot digest when we cut & paste from this forum to Google sheet. If Google go by the Yahoo way, importxml will not work in the future.
Found the reason. The quotes used in this forum is not recognized by Google. Replace with this " and it should work in google sheets

Anyways, the Bloomberg formula works for me but not google finance. Is this the same for everyone?
evilgod08 is offline   Reply With Quote
Old 08-01-2018, 08:04 PM   #58
Junior Member
 
Join Date: Jun 2009
Posts: 24
I have an Excel spreadsheet which I use to obtain price data. It takes some time to get all the quotes so it is not meant for frequent updates. I will try to share it the next time I access my computer, which will probably be this weekend.
cakery is offline   Reply With Quote
Old 10-02-2018, 03:10 PM   #59
Senior Member
 
cwm83's Avatar
 
Join Date: Sep 2000
Posts: 1,323
Hi all,

I have 2 alternatives if you are using Investment Moat's google spreadsheet.

Simply copy and paste the following into the respective cells:

For Bloomberg Prices:

=IMPORTXML("http://www.bloomberg.com/quote/"&F3&":SP","//div[@class='price']")

Replace the cell F3 with Bloombergs code for the SGX listed company. For instance, if you look up Keppel Corp, Bloomberg's code for keppel is KEP, so key in KEP in the cell F3.

For wall street journal prices:

=IMPORTXML("http://quotes.wsj.com/SG/"&F3&"","//span[@class='cr_num cr_curr_price']/span[@id='quote_val']")

WSJ is easier, because you just need to put in the SGX ticker in F3. For instance, the ticker for Kep Corp is BN4, so key in BN4 in the cell F3.

For some reason, quotes for the ETF G3B is not available on WSJ, so I had to use Bloomberg's prices for that. I only tested the above on google spreadsheets, not excel. I have no idea how to do it for excel.
do you know if its possible to get change, 52wk low and high?
__________________
a weirdo in weirdom speaking weirdish
cwm83 is offline   Reply With Quote
Old 11-02-2018, 02:38 PM   #60
Supremacy Member
 
Join Date: Nov 2017
Posts: 5,711
This one like don’t have any indicators
Only price history

Actually created this intraday charting site for personal usage.
see if anyone find this useful

http://jaic.ga/
appl888 is offline   Reply With Quote
Reply
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Terms of Service for more information.


Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On