getSymbols.tiingo | R Documentation |
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(),
...)
Symbols |
a character vector specifying the names of the symbols to be loaded |
env |
where to create objects (environment) |
api.key |
the API key issued by Tiingo when you registered (character) |
return.class |
class of returned object, see Value (character) |
periodicity |
one of |
adjust |
adjust for dividends and splits? (FALSE) |
from |
Retrieve data no earlier than this date. (2007-01-01) |
to |
Retrieve data through this date (Sys.Date()) |
... |
additional parameters as per |
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;
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"
.
Steve Bronder
Tiingo documentation available at https://www.tiingo.com
getSymbols
,
getSymbols.yahoo
,
getSymbols.av
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.