Main Content

close

Close Bloomberg Desktop connection V3

Since R2021a

Syntax

Description

example

close(c) closes the Bloomberg® connection V3 c using the Bloomberg Desktop C++ interface.

Examples

collapse all

First, create a Bloomberg Desktop connection. Then, request last and open prices for a security and close the connection. The current data you see when running this code can differ from the output data here.

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

c = bloomberg;

Request last and open prices for Microsoft®.

[d,sec] = getdata(c,'MSFT US Equity',{'LAST_PRICE';'OPEN'})
d = 
    LAST_PRICE: 33.3401
          OPEN: 33.6000

sec = 
    'MSFT US Equity'

getdata returns a structure d with the last and open prices. Also, getdata returns the security in sec.

Close the Bloomberg connection.

close(c)

Input Arguments

collapse all

Bloomberg connection, specified as a bloomberg object.

Version History

Introduced in R2021a