write_itch | R Documentation |
Note that additional information, e.g., columns that were added, will be dropped in the process and only ITCH-compliant information is saved.
write_itch(
ll,
file,
add_meta = TRUE,
append = FALSE,
compress = FALSE,
buffer_size = 1e+08,
quiet = FALSE,
append_warning = TRUE
)
ll |
a data.frame or a list of data.frames of ITCH messages, in the format
that the |
file |
the filename of the target file. If the folder to the file does not exist, it will be created recursively |
add_meta |
if date and file information should be added to the filename. Default value is TRUE. Note that adding meta information changes the filename. |
append |
if the information should be appended to the file. Default value is FALSE |
compress |
if the file should be gzipped. Default value is FALSE. Note that if you compress a file, buffer_size matters a lot, with larger buffers you are more likely to get smaller filesizes in the end. Alternatively, but slower, is to write the file without compression fully and then gzip the file using another program. |
buffer_size |
the maximum buffer size. Default value is 1e8 (100MB). Accepted values are > 52 and < 5e9 |
quiet |
if TRUE, the status messages are suppressed, defaults to FALSE |
append_warning |
if append is set, a warning about timestamp ordering is
given. Set |
Note that the ITCH filename contains the information for the date and exchange.
This can be specified explicitly in the file argument or it is added if not
turned off add_meta = FALSE
.
the filename (invisibly)
infile <- system.file("extdata", "ex20101224.TEST_ITCH_50", package = "RITCH")
sys <- read_system_events(infile, quiet = TRUE)
outfile <- tempfile()
write_itch(sys, outfile)
# create a list of events, stock directory, and orders and write to a file
sdir <- read_stock_directory(infile, quiet = TRUE)
od <- read_orders(infile, quiet = TRUE)
ll <- list(sys, sdir, od)
write_itch(ll, outfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.