Main Content

get

Properties of Bloomberg Desktop connection V3

Description

example

v = get(c) returns a structure where each field name is the name of a property of the bloomberg object c, which uses the Bloomberg® Desktop C++ interface, and each field contains the value of that property.

example

v = get(c,properties) returns the value of the specified properties properties for the bloomberg object.

Examples

collapse all

Create the Bloomberg connection using the Bloomberg Desktop C++ interface.

c = bloomberg;

Retrieve the Bloomberg connection properties.

v = get(c)
v = 

  struct with fields:

      session: [1×1 datafeed.internal.BLPSession]
    ipaddress: "localhost"
         port: 8194.00

v is a structure containing the Bloomberg session object, IP address, port number, timeout value, date and time data type, and data return format.

Close the Bloomberg connection.

close(c)

Create the Bloomberg connection using the Bloomberg Desktop C++ interface.

c = bloomberg;

Retrieve the port number from the Bloomberg connection object by specifying 'port' as a character vector.

property = "port";
v = get(c,property)
v =

        8194

v is a double that contains the port number of the Bloomberg connection object.

Close the Bloomberg connection.

close(c)

Create the Bloomberg connection using the Bloomberg Desktop C++ interface.

c = bloomberg;

Create a cell array properties with character vectors 'session' and 'port'. Retrieve the Bloomberg session object and port number from the Bloomberg connection object.

properties = ["session" "port"];
v = get(c,properties)
v = 

  struct with fields:

    session: [1×1 datafeed.internal.BLPSession]
       port: 8194

v is a structure containing the Bloomberg session object and port number.

Close the Bloomberg connection.

close(c)

Input Arguments

collapse all

Bloomberg connection, specified as a bloomberg object.

Property names, specified as a character vector, string scalar, cell array of character vectors, or string array containing Bloomberg connection property names. The property names are session, ipaddress, port, and timeout.

Data Types: char | cell | string

Output Arguments

collapse all

Bloomberg connection properties, returned as these data types depending on the requested properties.

Requested PropertiesData Type

Port number or timeout

Numeric scalar

IP address

Character vector

Bloomberg session

Object

All properties

Structure

Introduced in R2021a