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

blpAuthenticate

Authenticate Bloomberg API access


Description

This function authenticates against the the Bloomberg API

Usage

blpAuthenticate(uuid = getOption("blpUUID", NULL),
  host = getOption("blpLoginHostname", "localhost"),
  ip.address = getOption("blpLoginIP", NULL), con = defaultConnection(),
  default = TRUE)

Arguments

uuid

An optional character variable with a unique user id token. If this is missing the function will attempt to connect to B-PIPE or SAPI using the connection. It is assumed that an app_name was set. See blpConnect() for app_name information. Defaults to getOption("blpUUID") or NULL

host

An optional character variable with a hostname. This is the hostname of the machine where the user last authenticated. Either host or ip.address should be provided for user/uuid authentication. Note this is likely not the same 'host' used in blpConnect(). Defaults to getOption("blpLoginHostname") or "localhost"

ip.address

An optional character variable with an IP address for authentication. Usually the IP address where the uuid/user last logged into the Bloomberg Terminal appication. Defaults to getOption("blpLoginIP") or NULL, which will then lookup the IP of the "host" option.

con

A connection object as created by a blpConnect call, and retrieved via the internal function. This is the only required argument to authenticate a B-PIPE connection with a appName. Defaults to defaultConnection.

default

A logical indicating whether this authentication should be saved as the default, as opposed to returned to the user. Default to TRUE.

Value

In the default=TRUE case nothing is returned, and this authentication is automatically used for all future calls which omit the identity argument. Otherwise an authentication object is returned which is required by all the accessor functions in the package. (e.g. bdp() bds() getPortfolio()

Author(s)

Whit Armstrong and Dirk Eddelbuettel

Examples

## Not run: 
blpConnect(host=blpHost, port=blpPort)
blpAuthenticate(uuid=blpUUID, ip=blpIP_address)
bdp("IBM US Equity", "NAME")

blpid <- blpAuthenticate(uuid=blpUUID, ip=blpIP_address)
bdp("IBM US Equity", "NAME", identity=blpid)

## End(Not run)

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.