indexreport_get {rb3} | R Documentation |
Fetches indexes data from B3
Description
Downloads index data from B3 website https://www.b3.com.br/pt_br/market-data-e-indices/servicos-de-dados/market-data/historico/boletins-diarios/pesquisa-por-pregao/pesquisa-por-pregao/.
Usage
indexreport_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date(),
by = 1,
cache_folder = cachedir(),
do_cache = TRUE
)
indexreport_get(
refdate = Sys.Date(),
cache_folder = cachedir(),
do_cache = TRUE
)
Arguments
first_date |
First date ("YYYY-MM-DD") to |
last_date |
Last date ("YYYY-MM-DD") to |
by |
Number of days in between fetched dates (default = 1) in |
cache_folder |
Location of cache folder (default = cachedir()) |
do_cache |
Whether to use cache or not (default = TRUE) |
refdate |
Specific date ("YYYY-MM-DD") to |
Details
indexreport_get
returns index data for the given date and
indexreport_mget
returns index data for a given range of dates.
Value
A dataframe with index data (OHLC, average and daily oscillation)
Examples
## Not run:
df_ir <- indexreport_mget(Sys.Date() - 5, Sys.Date())
head(df_ir)
## End(Not run)
## Not run:
df_ir <- indexreport_get(Sys.Date())
head(df_ir)
## End(Not run)
[Package rb3 version 0.0.11 Index]