Discussion:
Verizon/Yahoo dropping stock quote API
(too old to reply)
root
2017-11-02 22:55:15 UTC
Permalink
Raw Message
For decades finance.yahoo.com has provided (time delayed) stock
quotes for tracking your portfolio.

Yesterday this service was dropped, they say because some users
were violating the terms of service.

For now you can scrape the information you need from repeated
calls to:

https://finance.yahoo.com/quote/TEVA/

using TEVA as an example portfolio component.

I'm not aware of alternative (free) sources for such data and
would welcome any suggestions.

BTW: one contributor to a forum on the subject at yahoo suggested
the term of service that was being violated was that users
were not viewing the ads.
Robert Riches
2017-11-03 03:52:02 UTC
Permalink
Raw Message
Post by root
For decades finance.yahoo.com has provided (time delayed) stock
quotes for tracking your portfolio.
Yesterday this service was dropped, they say because some users
were violating the terms of service.
For now you can scrape the information you need from repeated
https://finance.yahoo.com/quote/TEVA/
using TEVA as an example portfolio component.
I'm not aware of alternative (free) sources for such data and
would welcome any suggestions.
BTW: one contributor to a forum on the subject at yahoo suggested
the term of service that was being violated was that users
were not viewing the ads.
Sad that it isn't just a one-day technical difficulty on the
site. I'd also be interested in free or low-cost sources of
intraday and historical quotes. I used to happily pay Yahoo's
$10 per month charge for the real-time quote service until they
decided they didn't want to take my money.

Another option to get Yahoo quote info is to put the symbols of
interest in your watchlist, go to the 'My Watchlist' page, and
either use the 'Export' button to save multiple symbols as CSV or
use 'Select All' and 'Copy' to capture the text from the page and
parse out the desired info.

Using the xmacroplay utility, you can automate the process of
going to different quote pages and capturing information from
each page. Sometimes, middle-of-page ads cause the data to shift
around, so you may have to use trial-and-error to capture the
info you want.
--
Robert Riches
***@jacob21819.net
(Yes, that is one of my email addresses.)
Robert Riches
2017-12-27 05:05:02 UTC
Permalink
Raw Message
Post by Robert Riches
Post by root
For decades finance.yahoo.com has provided (time delayed) stock
quotes for tracking your portfolio.
Yesterday this service was dropped, they say because some users
were violating the terms of service.
For now you can scrape the information you need from repeated
https://finance.yahoo.com/quote/TEVA/
using TEVA as an example portfolio component.
I'm not aware of alternative (free) sources for such data and
would welcome any suggestions.
BTW: one contributor to a forum on the subject at yahoo suggested
the term of service that was being violated was that users
were not viewing the ads.
Sad that it isn't just a one-day technical difficulty on the
site. I'd also be interested in free or low-cost sources of
intraday and historical quotes. I used to happily pay Yahoo's
$10 per month charge for the real-time quote service until they
decided they didn't want to take my money.
Another option to get Yahoo quote info is to put the symbols of
interest in your watchlist, go to the 'My Watchlist' page, and
either use the 'Export' button to save multiple symbols as CSV or
use 'Select All' and 'Copy' to capture the text from the page and
parse out the desired info.
Using the xmacroplay utility, you can automate the process of
going to different quote pages and capturing information from
each page. Sometimes, middle-of-page ads cause the data to shift
around, so you may have to use trial-and-error to capture the
info you want.
Apologies for following up to my own post and for this being OT
wrt Slackware:

For the benefit of the original poster in this thread (and anyone
else who might be following the thread), Google has a reasonably
useful API that can access much of what Yahoo used to provide.
There is some documentation of the API here:

https://www.quantshare.com/sa-426-6-ways-to-download-free-intraday-and-tick-data-for-the-us-stock-market

There may be other fields available, but I have not seen
documentation of them. I had to modify the URL to be more like
this:

https://finance.google.com/finance/getprices?i=60&p=1d&f=d,o,h,l,c,v&q=IBM

It looks like about 14 days worth of data (at 60-second
intervals) is the most the API will return.

For the major indices, use these pseudo-symbols:
.DJI
.IXIC
.INX

HTH
--
Robert Riches
***@jacob21819.net
(Yes, that is one of my email addresses.)
root
2017-12-27 16:25:30 UTC
Permalink
Raw Message
Post by Robert Riches
For the benefit of the original poster in this thread (and anyone
else who might be following the thread), Google has a reasonably
useful API that can access much of what Yahoo used to provide.
https://www.quantshare.com/sa-426-6-ways-to-download-free-intraday-and-tick-data-for-the-us-stock-market
There may be other fields available, but I have not seen
documentation of them. I had to modify the URL to be more like
https://finance.google.com/finance/getprices?i=60&p=1d&f=d,o,h,l,c,v&q=IBM
It looks like about 14 days worth of data (at 60-second
intervals) is the most the API will return.
.DJI
.IXIC
.INX
HTH
These sites are a tremendous find. I was especially interested in the
Norwegian site that was supposed to give bid/asked prices. Unfortunately
for me the site didn't respond.

After Verizon took over yahoo finance they not only dropped the old
method of fetching quotes, but they changed all their data sources
to require a javascript browser for access. After the original post
I posted a c routine which allowed one to scrape the quote data
from the web site without using a browser.

For intraday tracking someone suggested I set up a portfolio
and use the export command in the yahoo page. That works
very well and I am now comfortable with that.

Yahoo also offers other financial data that utilize javascript
within the browser. It is possible to scrape all that data
from one page download by poking around in the html source.

I have come to mistrust Google financial data. When I compare
financial data downloaded from google with that from either
Edgar or Yahoo, I find little changes in the google data that
seem deliberate. Sometimes quarterly data will be reversed,
sometimes the format of individual fields will differ.
Sometimes quarterly data is not given in sequence, the list
goes on.

Some time ago when paper maps were used I read that each map
company puts little errors such as misspellings in the map
to catch copyright violators. I think google may have such
mentality.

Thanks for the sources, I will probably spend the rest of
the day playing with the data.
Roland Latour
2017-12-30 04:29:59 UTC
Permalink
Raw Message
There may be other fields available, but I have not seen documentation
https://finance.google.com/finance/getprices?
i=60&p=1d&f=d,o,h,l,c,v&q=IBM
Thanks for this info. I played with it awhile, ended up with:
http://user.cavenet.com/rolandl/quote.txt

Rename to quote, chmod +x, save in $PATH, and run with as
many ticker symbols you want. Returns latest, which is all
I care about in my spreadsheet.
Roland Latour
2018-01-03 15:52:16 UTC
Permalink
Raw Message
Post by Roland Latour
http://user.cavenet.com/rolandl/quote.txt
Rename to quote, chmod +x, save in $PATH, and run with as many ticker
symbols you want. Returns latest, which is all I care about in my
spreadsheet.
I can format the output any way that is needed. What I would like to do
is "import" the prices into column B, cells 2 thru whatever, because I
laid out the spreadsheet just as you probably did, with data titles in
row 1, and stock symbols in column A. The pointy-clicky interface seems
to always import CSV files starting at A1, which makes a mess.

I looked around, maybe DIF is the syntax needed for my script output?
Documentation on that is slim. Maybe a Gnumeric Guru can give me a hint
on how to do this importation? Thanks.
Bit Twister
2018-01-03 16:35:47 UTC
Permalink
Raw Message
Post by Roland Latour
I can format the output any way that is needed. What I would like to do
is "import" the prices into column B, cells 2 thru whatever, because I
laid out the spreadsheet just as you probably did, with data titles in
row 1, and stock symbols in column A.
csv format is a comma field separator. If you want your first column
data in B, just put a ,data,whatever,whatelse,,,,
Try this. Paste the two lines into a.csv and import it.

symbol,stock cost,pe
,23.15,6
Roland Latour
2018-01-03 18:23:14 UTC
Permalink
Raw Message
Post by Bit Twister
Post by Roland Latour
I can format the output any way that is needed. What I would like to do
is "import" the prices into column B, cells 2 thru whatever, because I
laid out the spreadsheet just as you probably did, with data titles in
row 1, and stock symbols in column A.
csv format is a comma field separator. If you want your first column
data in B, just put a ,data,whatever,whatelse,,,,
Try this. Paste the two lines into a.csv and import it.
symbol,stock cost,pe ,23.15,6
Sorry, that didn't help. I put the 2-line info into test.csv & ran
'gnumeric test.csv' & it imported. Then I saved to test.gnumeric and
modified test.csv: uppercase "symbol", that's all.
Then I tried point-n-click import to cell A1 &following cells, and to
my surprise I got a second spreadsheet window with the import.

Then I tried 'gnumeric test.gnumeric test.csv' and again got 2 windows.
I guess I don't understand the idea of importing data into an existing
spreadsheet. I'm looking to overwrite cells b2:b7. I could dummy up
a1:b1 and the symbols in a1:a7. But I need to overwrite, not start up
a new spreadsheet.

Loading...