blpAuthenticate: Authenticate Bloomberg API access

View source: R/blpAuthenticate.R

blpAuthenticateR Documentation

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,
  isAuthId = getOption("blpIsAuthId", FALSE),
  appName = getOption("blpAppName", NULL)
)

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.

isAuthId

A logical indicating whether to interpret the uuid as an authId for authenticating a user with a B-PIPE application.

appName

If isAuthId is TRUE, this is a character string associated with the B-PIPE application name. This will be the same appName used by blpConnect(). If isAuthId is FALSE, this will be ignored.

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 documentation built on Oct. 6, 2022, 9:06 a.m.