[This article was first published on FOSS Trading
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
Thanks to Paul Teetor, getSymbols() can now import data from Alpha Vantage! This feature is part of the quantmod 0.4-11 release, and provides another another data source to avoid any Yahoo Finance API changes*.
Alpha Vantage is a free web service that provides real-time and historical equity data. They provide daily, weekly, and monthly history for both domestic and international markets, with up to 20 years of history. Dividend and split adjusted close prices are available for daily data. They also provide near real-time price bars at a resolution of 1 minute or more, for up to 10 recent days.
getSymbols(“MSFT”, src = “av”, api.key = “[your key]”)
Where you replace “[your key”] with the API key you receive after registration. You can use setDefaults() to set your API key one time, and use it for all getSymbols.av() calls.
setDefaults(“getSymbols.av”, api.key = “[your key]”)
*Speaking of API changes, this release also includes a fix for a Yahoo Finance change (#174
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook