
Last chance! 50% off unlimited learning
Sale ends in
Downloads historical or realtime equity price data from https://www.tiingo.com/. Registration is required.
getSymbols.tiingo(Symbols, env, api.key,
return.class="xts",
periodicity="daily",
adjust=FALSE,
from='2007-01-01',
to=Sys.Date(),
...)
A call to getSymbols(Symbols, src="tiingo")
will create objects
in the specified environment,
one object for each Symbol
specified.
The object class of the object(s) is determined by return.class
.
Presently this may be "ts"
, "zoo"
, "xts"
, or "timeSeries"
.
a character vector specifying the names of the symbols to be loaded
where to create objects (environment)
the API key issued by Tiingo when you registered (character)
class of returned object, see Value (character)
one of "daily"
, "weekly"
, "monthly"
, or "Annually"
adjust for dividends and splits? (FALSE)
Retrieve data no earlier than this date. (2007-01-01)
Retrieve data through this date (Sys.Date())
additional parameters as per getSymbols
Steve Bronder
Meant to be called internally by getSymbols
only.
This method is not meant to be called directly, instead
a call to getSymbols("x", src="tiingo")
will
in turn call this method. It is documented for the
sole purpose of highlighting the arguments accepted.
You must register with Tiingo in order to download their data.
Register at their web site, https://www.tiingo.com,
and you will receive an API key:
a short string of alphanumeric characters (e.g., "FU4U").
Provide the API key every time you call getSymbols
;
or set it globally using setDefaults(getSymbols.tiingo, api.key="yourKey")
.
Tiingo provides daily, weekly, monthly, and annual data.
Use periodicity
to select one.
This API accessor will return adjusted or unadjusted OHLC as well as split and dividend information.
For daily, weekly, and monthly data, Tiingo says the available data is up to 30 years;
Tiingo documentation available at https://www.tiingo.com
getSymbols
,
getSymbols.yahoo
,
getSymbols.av
if (FALSE) {
# You'll need the API key given when you registered
getSymbols("IBM", src="tiingo", api.key="yourKey")
# Repeating your API key every time is tedious.
# Fortunately, you can set a global default.
setDefaults(getSymbols.tiingo, api.key="yourKey")
getSymbols("IBM", src="tiingo")
}
Run the code above in your browser using DataLab