Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getMultipleTicks

Get Multiple Ticks from Bloomberg


Description

This function uses the Bloomberg API to retrieve multiple ticks for the requested security.

Usage

getMultipleTicks(security, eventType = c("TRADE", "BID", "ASK"),
  startTime = Sys.time() - 60 * 60, endTime = Sys.time(), verbose = FALSE,
  returnAs = getOption("blpType", "data.frame"), tz = Sys.getenv("TZ", unset
  = "UTC"), con = defaultConnection())

Arguments

security

A character variable describing a valid security ticker

eventType

A character vector describing event types, default is c("TRADE", "BID", "ASK")

startTime

A Datetime object with the start time, defaults to one hour before current time

endTime

A Datetime object with the end time, defaults to current time

verbose

A boolean indicating whether verbose operation is desired, defaults to ‘FALSE’

returnAs

A character variable describing the type of return object; currently supported are ‘data.frame’ (also the default) and ‘data.table’

tz

A character variable with the desired local timezone, defaulting to the value ‘TZ’ environment variable, and ‘UTC’ if unset

con

A connection object as created by a blpConnect call, and retrieved via the internal function defaultConnection.

Value

A numeric matrix with elements ‘time’, (as a ‘POSIXct’ object), ‘values’ and ‘sizes’, or an object of the type selected in returnAs.

Author(s)

Dirk Eddelbuettel


Rblpapi

R Interface to 'Bloomberg'

v0.3.11
file LICENSE
Authors
Whit Armstrong, Dirk Eddelbuettel and John Laing
Initial release
2021-04-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.