powered by
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.
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)
futures_get(refdate = Sys.Date(), cache_folder = cachedir(), do_cache = TRUE)
data.frame with futures prices.
data.frame
First date ("YYYY-MM-DD") to yc_mget multiple curves
yc_mget
Last date ("YYYY-MM-DD") to yc_mget multiple curves
Number of days in between fetched dates (default = 1) in yc_mget
Location of cache folder (default = cachedir())
Whether to use cache or not (default = TRUE)
futures_get returns the future contracts for the given date and futures_mget returns future contracts for multiple dates in a given range.
futures_get
futures_mget
Specific date ("YYYY-MM-DD") to yc_get single curve
yc_get
if (FALSE) { df <- futures_get("2022-04-18", "2022-04-22") } if (FALSE) { df_fut <- futures_get(Sys.Date()) head(df_fut) }
Run the code above in your browser using DataLab