NasdaqDataLink {NasdaqDataLink} | R Documentation |
Retrieves Data from the Nasdaq Data Link Dataset endpoint and formats
Description
Retrieves Data from the Nasdaq Data Link Dataset endpoint and formats
Usage
NasdaqDataLink(
code,
type = c("raw", "ts", "zoo", "xts", "timeSeries"),
transform = c("", "diff", "rdiff", "normalize", "cumul", "rdiff_from"),
collapse = c("", "daily", "weekly", "monthly", "quarterly", "annual"),
order = c("desc", "asc"),
meta = FALSE,
force_irregular = FALSE,
...
)
Arguments
code |
Dataset code on Nasdaq Data Link specified as a string or an array of strings. |
type |
Type of data returned specified as string. Can be 'raw', 'ts', 'zoo', 'xts' or 'timeSeries'. |
transform |
Apply Nasdaq Data Link API data transformations. |
collapse |
Collapse frequency of Data. |
order |
Select if data is given to R in ascending or descending formats. Helpful for the rows parameter. |
meta |
Adds meta data as an attribute to the returned Data. |
force_irregular |
When set to TRUE, forces the index of the Data to be of date format yyyy-mm-dd |
... |
Additional named values that are interpreted as Nasdaq Data Link API parameters. Please see https://docs.data.nasdaq.com/docs/in-depth-usage#get-time-series-metadata for a full list of parameters. |
Details
Set your api_key
with NasdaqDataLink.api_key
function. For instructions on finding your api key go to https://data.nasdaq.com/account/profile.
Value
Depending on the type the class is either data.frame, time series, xts, zoo or timeSeries.
References
This R package uses the Nasdaq Data Link API. For more information go to https://docs.data.nasdaq.com. For more help on the package itself go to https://data.nasdaq.com/tools/r.
See Also
Examples
## Not run:
data_link_data = NasdaqDataLink("NSE/OIL", collapse="monthly", start_date="2013-01-01", type="ts")
plot(data_link_data[,1])
## End(Not run)