B3, and previously BMF&Bovespa, used to deliver many files with a diverse set of valuable data and informations that can be used to study of can be called of marketdata. There are files with informations about futures, option, interest rates, currency rates, bonds and many other subjects.

read_marketdata(
  filename,
  template = NULL,
  parse_fields = TRUE,
  do_cache = TRUE
)

Arguments

filename

a string containing a path for the file.

template

a string with the template name.

parse_fields

a logical indicating if the fields must be parsed.

do_cache

Whether to use cache or not (default = TRUE)

Each template has a default value for the filename, if the given file name equals one template filename attribute, the matched template is used to parse the file. Otherwise the template must be provided.

The function show_templates can be used to view the available templates and their default filenames.

Value

data.frame of a list of data.frame containing data parsed from files.

See also

show_templates display_template

Examples

if (FALSE) {
# Eletro.txt matches the filename of Eletro template
path <- "Eletro.txt"
df <- read_marketdata(path)
path <- "Indic.txt"
df <- read_marketdata(path, template = "Indic")
path <- "PUWEB.TXT"
df <- read_marketdata(path, template = "PUWEB")
}