‘tidyverse’ package removed from DESCRIPTION file per Hadley Wickham suggestion to improve performance and avoid future potential issues
Vignette updated
I’m excited to announce that Riex
package is now available on CRAN! and you can install using:
Main purpose of RIEX
is to efficiently and reliably retrieve stocks and market data via IEX Cloud API
. Platform is offered by Investors Exchange Group - IEX Group. To subscribe, visit: IEX Cloud
First Riex
release includes basic functions that retrieve data in a standard format - e.g. Data frames. Future releases are expected to:
R
capabilities including existing packages to effectively provide financial and statistical analysis as well as visualization.Reticuate
- an R
package that interface with Python modules, classes and functions to further enhance the capability to process and analyze data.Secret Key/ Token is required for all API callS. It is available via Account Console and assigned the variable sk in the documentation. e.g. sk <- “sk_…”.
Keep your Secret Token safe. Your Secret Token can make any API call on behalf of your account, including changes that may impact billing such as enabling pay-as-you-go charges.
For more details about best practices to store and encrypt Secret Key/ Token check httr package | Managing secrets by Hadley Wickham
Load Package
Assign valid values to key parameters:
sk <- “[SECRET KEY]”. e.g. sk <- “sk_…”
x <- “TSLA”
r <- “1y”
Account usage details
iex.key.usage()
Time series - OHLC
Use quantmod
package for visualization
Generate Barchart
To check available themes to customize visualization
To apply a different Theme
chartSeries(TSLA)
To create an interactive chart for multiple stocks
Credit: Chris Bow
To view top records in time series for TSLA
Change columns names to specify close by symbol
[1] “2018-05-16”
[1] “2019-05-15”
stocks_chart <- dygraph(stocks, main = "TSLA & GM Closing Price - 1 Year") %>%
dySeries("GM.Close", axis = "y2") %>%
dyAxis("y",
label = "TSLA") %>%
dyAxis("y2",
label = "GM",
valueRange = c(20, 50),
independentTicks = TRUE) %>%
dyRangeSelector(dateWindow = c("2018-05-16", "2019-05-15")) %>%
dyRoller()
Install and load htmlwidgets
IEX Group mission “We’re building fairer markets.” is the motivation for this project and certainly hope to continue supporting their effort and bring value to the community. There has been significant enhancements since launching IEX Cloud API
which makes this project really exciting!!
Your feedback and suggestions will be key to continuously improve Riex
so it becomes relevant and practical to use. Please provide feedback and report any issues on GitHub.