Rblpapi (version 0.3.8)

blpConnect: Establish connection to Bloomberg service

Description

This function connects to the Bloomberg API

Usage

blpConnect(host = getOption("blpHost", "localhost"),
  port = getOption("blpPort", 8194L), default = TRUE)

Arguments

host

A character option with either a machine name that is resolvable by DNS, or an IP address. Defaults to ‘localhost’.

port

An integer variable with the connection port. Default to 8194L.

default

A logical indicating whether this connection 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 connection is automatically used for all future calls which omit the con argument. Otherwise a connection object is returned which is required by all the accessor functions in the package.

Details

For both host and port argument, default values can also be specified via options using, respectively, the named entries blpHost and blpConnect.

If an additional option blpAutoConnect is set to ‘TRUE’, a connection is established in the .onAttach() function and stored in the package environment. This effectively frees users from having to explicitly create such an object.

Examples

Run this code
# NOT RUN {
  con <- blpConnect()   # adjust as needed
# }

Run the code above in your browser using DataCamp Workspace