How can I get the day range of any stock symbol? http://finance.google.com/finance/info?client=ig&q=NASDAQ:MSFT gives me a bunch of info but only want the high and low of the day. I looked into the google finance API and I don't think it gives me that info. Note: I don't have to use google finance, it could be anything. Thank you.
Asked
Active
Viewed 1,292 times
2 Answers
2
The Perl module Finance-YahooQuote has supported this for close to a decade:
edd@max:~$ yahooquote --verbose GOOG
Symbol: GOOG
Name: Google Inc.
Last: 518.26
Trade Date: 5/24/2011
Trade Time: 4:00pm
Change: -0.13
% Change: -0.03%
Volume: 1888538
Avg. Daily Volume: 2789260
Bid: 510.14
Ask: 519.50
Prev. Close: 518.39
Open: 520.00
Day's Range: 518.15 - 523.962 ## here is your range for the day
52-Week Range: 433.63 - 642.96
EPS: 25.75
P/E Ratio: 20.13
Div. Pay Date: N/A
Div/Share: 0.00
Div. Yield: N/A
Mkt. Cap: 167.0B
Exchange: NasdaqNM
edd@max:~$
This just uses a canned comamnd-line frontend you could customize. And you can specify which fields you want downloaded, so if you really only want day high and low, that is possible via an argument you can specify. Getting documentation is a little tricky but some is included in the documentation for the Perl module.
The Beancounter application builds on this and downloads (in batches), archives to DB (with support for four different backends like Postgresql, Mysql, SQLite and ODBC) and runs some analysis.
Both packages are included in Debian / Ubuntu but run of course also everywhere else, including Windows as they just need Perl.

Dirk Eddelbuettel
- 360,940
- 56
- 644
- 725
-
Looking to get that info with php. Thanks. – milan May 25 '11 at 00:58
-
1Yes, gummy-stuffy is good. What I wrote in the docs for the Perl modules came from the html sources at Yahoo!. And of course, you are not forced to use Perl -- you can use this to test the call against the CSV-serving interface that you can hit with just about any language. – Dirk Eddelbuettel May 25 '11 at 01:18