getQuote: Download Current Stock Quote

Description Usage Arguments Value Author(s) References See Also Examples

Description

Fetch current stock quote(s) from specified source. At present this only handles sourcing quotes from Yahoo Finance, but it will be extended to additional sources over time.

Usage

1
2
3
4
5
getQuote(Symbols, src = "yahoo", what, ...)

standardQuote(src="yahoo")
yahooQF(names)
yahooQuote.EOD

Arguments

Symbols

character string of symbols, seperated by semi-colons

src

source of data (only yahoo is implemented in quantmod)

what

what should be retrieved

names

which data should be retrieved

...

currently unused

Value

A maximum of 200 symbols may be requested per call to Yahoo!, and all requested will be returned in one data.frame object. If more that 200 symbols are requested, multiple 200 symbol calls will be made and the results will be returned as one data object.

getQuote returns a data frame with rows matching the number of Symbols requested, and the columns matching the requested columns.

The what argument allows for specific data to be requested. For getQuote.yahoo, the value of what should be a quoteFormat object like that returned by standardQuote which contains Yahoo!'s formatting string. If not provided, the A list and interactive selection tool can be seen with yahooQF.

standardQuote currently only applied to Yahoo! data, and returns an object of class quoteFormat, for use within the getQuote function.

yahooQuote.EOD is a constant quoteFormat object for OHLCV data.

Author(s)

Jeffrey A. Ryan

References

Yahoo! Finance finance.yahoo.com gummy-stuff.org www.gummy-stuff.org/Yahoo-data.htm

See Also

getSymbols

Examples

1
2
3
4
5
6
7
8
yahooQuote.EOD
## Not run: 
getQuote("AAPL")
getQuote("QQQQ;SPY;^VXN",what=yahooQF(c("Bid","Ask")))
standardQuote()
yahooQF()

## End(Not run)

R-Finance/quantmod documentation built on May 9, 2017, 9:41 p.m.