bdl

Bloomberg Data License connection

Description

The bdl function creates a bdl object. The bdl object represents a Bloomberg® Data License connection.

Other functions connect to different Bloomberg services: Bloomberg Desktop (blp), Bloomberg Server (blpsrv), and Bloomberg B-PIPE® (bpipe). For details about these 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 bdl. For details, see Installing Bloomberg and Configuring Connections.

Creation

Description

example

c = bdl(login,password,hostname,port,decrypt) connects to the Bloomberg Data License server using the Secure File Transfer Protocol (SFTP). This syntax sets the Login, Hostname, and Port properties, and uses these input arguments:

  • Bloomberg Data License SFTP server password

  • Decryption code decrypt

example

c = bdl(login,password,hostname,port,decrypt,authoption,keyfile,passphrase) connects to the Bloomberg Data License server using key authentication, sets the AuthOption and KeyFile properties, and uses a pass phrase.

Input Arguments

expand all

Bloomberg Data License SFTP password, specified as a character vector or string scalar.

Example: 'xxxxxxxx'

Data Types: char | string

Decryption code, specified as a character vector or string scalar to denote the Data Encryption Standard (DES) encryption key.

Example: 'nAcLeZ'

Data Types: char | string

Pass phrase, specified as a character vector or string scalar. The bdl function uses this phrase to decrypt the key file. Use this argument only when the authentication type is set to 'key'.

Example: 'mykeyphrase'

Data Types: char | string

Properties

expand all

Bloomberg Data License SFTP server login name, specified as a character vector or string scalar.

Example: 'xxxxx'

Data Types: char | string

Bloomberg Data License SFTP server name, specified as a character vector or string scalar.

Example: 'dlsftp.bloomberg.com'

Data Types: char | string

Bloomberg Data License SFTP port number of the machine running the Bloomberg Data License server, specified as a numeric scalar.

Example: 30206

Data Types: double

Authentication type, specified as one of these values.

  • 'password' — Password authentication

  • 'key' — Key file authentication

When you use the 'password' value, you must specify the Bloomberg Data License SFTP server password in the password input argument.

When you use the 'key' value, you must specify a key file name by setting the KeyFile property and specify a pass phrase in the passphrase input argument.

Key file, specified as a character vector or string scalar to denote the full path for the private key file. Use this property only when the authentication type is set to 'key'.

Example: 'c:\temp\mykeyfile'

Data Types: char | string

Bloomberg Data License API connection, specified as a Bloomberg Data License API connection object.

Example: [1x1 com.bloomberg.datalic.api.ExtendedFTPConnection]

Object Functions

closeClose Bloomberg connection V3
dirCurrent Bloomberg Data License connection folder listing

Examples

collapse all

Connect to the Bloomberg Data License SFTP server using a password.

Create the Bloomberg Data License connection c. This example assumes the following:

  • The Bloomberg Data License SFTP server login name is 'xxxxx'.

  • The Bloomberg Data License SFTP server password is 'xxxxxxxx'.

  • The Bloomberg Data License SFTP server name is 'dlsftp.bloomberg.com'.

  • The Bloomberg Data License SFTP port number is 30206.

  • The decryption code is 'nAcLeZ'.

login = 'xxxxx';
password = 'xxxxxxxx';
hostname = 'dlsftp.bloomberg.com';
port = 30206;
decrypt = 'nAcLeZ';

c = bdl(login,password,hostname,port,decrypt)
c =

bdl with properties:
 
          Login: 'xxxxx'
       Hostname: 'dlsftp.bloomberg.com'
           Port: 30206
     AuthOption: 'password'
        KeyFile: ''
     Connection: [1x1 com.bloomberg.datalic.api.ExtendedFTPConnection]

c returns the Bloomberg Data License connection object with these properties:

  • Bloomberg Data License SFTP server login name

  • Bloomberg Data License SFTP server name

  • Bloomberg Data License SFTP port number

  • Authentication type (in this case, the default password authentication)

  • Key file (in this case, blank)

  • Bloomberg Data License API object

For an example of data retrieval, see Retrieve Data Using Bloomberg Data License.

Close the Bloomberg Data License connection.

close(c)

Connect to the Bloomberg Data License SFTP server using a key file.

Create the Bloomberg Data License connection c. This example assumes the following:

  • The Bloomberg Data License SFTP server login name is 'xxxxx'.

  • The Bloomberg Data License SFTP server password is 'xxxxxxxx'.

  • The Bloomberg Data License SFTP server name is 'dlsftp.bloomberg.com'.

  • The Bloomberg Data License SFTP port number is 30206.

  • The decryption code is 'nAcLeZ'.

  • The authentication type is 'key'.

  • The full path to the key file is 'c:\temp\mykeyfile'.

  • The pass phrase is 'mykeyphrase'.

login = 'xxxxx';
password = 'xxxxxxxx';
hostname = 'dlsftp.bloomberg.com';
port = 30206;
decrypt = 'nAcLeZ';
authoption = 'key';
keyfile = 'c:\temp\mykeyfile';
passphrase = 'mykeyphrase';

c = bdl(login,password,hostname,port,decrypt,authoption, ...
    keyfile,passphrase)
c =

bdl with properties:
 
          Login: 'xxxxx'
       Hostname: 'dlsftp.bloomberg.com'
           Port: 30206
     AuthOption: 'key'
        KeyFile: 'c:\temp\mykeyfile'
     Connection: [1x1 com.bloomberg.datalic.api.ExtendedFTPConnection]

c returns the Bloomberg Data License connection object with these properties:

  • Bloomberg Data License SFTP server login name

  • Bloomberg Data License SFTP server name

  • Bloomberg Data License SFTP port number

  • Authentication type (in this case, key authentication)

  • Full path to the key file

  • Bloomberg Data License API object

For an example of data retrieval, see Retrieve Data Using Bloomberg Data License.

Close the Bloomberg Data License connection.

close(c)

Tips

For details about Bloomberg Data License, see the relevant guides by entering DLSD and clicking <GO> in the Bloomberg terminal.

Introduced in R2015a