Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

get

Properties of Bloomberg connection V3

Syntax

Description

example

v = get(c) returns a structure where each field name is the name of a property of c 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® V3 connection object.

Examples

collapse all

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server API using blpsrv or Bloomberg B-PIPE® using bpipe.

Retrieve the Bloomberg connection properties.

v = get(c)
v = 

      session: [1x1 com.bloomberglp.blpapi.Session]
    ipaddress: 'localhost'
         port: 8194
      timeout: 0

v is a structure containing the Bloomberg session object, IP address, port number, and timeout value.

Close the Bloomberg connection.

close(c)

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server API using blpsrv or Bloomberg B-PIPE using bpipe.

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.

c = blp;

Alternatively, you can connect to the Bloomberg Server API using blpsrv or Bloomberg B-PIPE using bpipe.

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 = 

    session: [1x1 com.bloomberglp.blpapi.Session]
       port: 8194

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

Close the Bloomberg connection.

close(c)

Related Examples

Input Arguments

collapse all

Bloomberg connection, specified as a connection object created using blp, blpsrv, or bpipe.

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

Data Types: char | cell

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 R2010a

Was this topic helpful?