Learn R Programming

rb3 (version 0.0.12)

read_marketdata: Read and parses files delivered by B3

Description

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.

Usage

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

Value

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

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.

See Also

show_templates display_template

Examples

Run this code
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")
}

Run the code above in your browser using DataLab