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.

blp

Bloomberg Desktop connection V3

The blp function provides the connection to the Bloomberg® Desktop.

There are other functions that connect to different Bloomberg services: Bloomberg Server (blpsrv), Bloomberg B-PIPE® (bpipe), and Bloomberg Data License (bdl). For details about these Bloomberg services, see Comparing Bloomberg Connections.

For details about Bloomberg connection requirements, see Data Server Connection Requirements. To ensure a successful Bloomberg connection, perform the required steps before executing blp. For details, see Installing Bloomberg and Configuring Connections.

Syntax

Description

example

c = blp creates a Bloomberg connection object that contains the Bloomberg Desktop connection. You need a Bloomberg Desktop software license for the host on which the Datafeed Toolbox™ and MATLAB® software are running.

    Caution:   To refer to a Bloomberg connection in other functions, use the connection object created using blp. Otherwise, using blp as an input argument opens multiple Bloomberg connections causing unexpected behavior and exhausting memory resources.

example

c = blp(portnumber,ip,timeout) creates a Bloomberg connection object using the IP address of the local machine where Bloomberg is running and a timeout value.

Examples

collapse all

Create a Bloomberg connection c to the Bloomberg Desktop.

c = blp
c = 
  blp with properties:
      session: [1x1 com.bloomberglp.blpapi.Session]
    ipaddress: 'localhost'
         port: 8194
      timeout: 0

blp creates a Bloomberg connection object c with these properties:

  • Bloomberg V3 API COM object

  • IP address of the local machine

  • Port number of the local machine

  • Number in milliseconds specifying how long MATLAB attempts to connect to Bloomberg Desktop before timing out

Close the Bloomberg Desktop connection.

close(c)

Create a Bloomberg connection c using the default port and 'localhost' as the IP address, with a timeout value of 10,000 milliseconds.

c = blp([],[],10000)
c = 
  blp with properties:
      session: [1x1 com.bloomberglp.blpapi.Session]
    ipaddress: 'localhost'
         port: 8194
      timeout: 10000

blp creates a Bloomberg connection object c and returns its properties.

Close the Bloomberg Desktop connection.

close(c)

Related Examples

Input Arguments

collapse all

Port number that identifies the port number of the local machine where Bloomberg is running, specified as a numeric scalar.

Data Types: double

IP address that identifies the local machine where Bloomberg is running, specified as a character vector.

Data Types: char

Timeout value that denotes the time in milliseconds the local machine attempts to connect before timing out, specified as a numeric scalar.

Data Types: double

Output Arguments

collapse all

Bloomberg Desktop connection V3, returned as a connection object with these properties.

PropertyDescription

session

Bloomberg V3 API COM object

ipaddress

IP address of the local machine

port

Port number of the local machine

timeout

Number in milliseconds specifying how long MATLAB attempts to connect to Bloomberg Desktop before timing out

Introduced in R2010a

Was this topic helpful?