futures_get {rb3} | R Documentation |
Get futures prices from trading session settlements page
Description
Scrape page https://www.b3.com.br/en_us/market-data-and-indices/data-services/market-data/historical-data/derivatives/trading-session-settlements/ to get futures prices.
Usage
futures_mget(
first_date = Sys.Date() - 5,
last_date = Sys.Date(),
by = 1,
cache_folder = cachedir(),
do_cache = TRUE
)
futures_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 |
Value
data.frame
with futures prices.
Examples
## Not run:
df <- futures_get("2022-04-18", "2022-04-22")
## End(Not run)
## Not run:
df_fut <- futures_get(Sys.Date())
head(df_fut)
## End(Not run)
[Package rb3 version 0.0.11 Index]