Main Content

InstallingBloombergand Configuring Connections

Datafeed Toolbox™ provides various ways to connect to Bloomberg®by using Bloomberg interfaces and Bloomberg C++ interfaces. For details, seeComparing Bloomberg Connections. Before connecting to the Bloomberg interfaces, follow these required steps. For Bloomberg C++ interfaces, the only required step is to install the Bloomberg software.

InstallBloombergSoftware

For the latest Bloomberg software, seehttps://www.bloomberg.com.

After installing the Bloomberg software, add Java®archive (JAR) files to the MATLAB®Java类路径并运行彭博通信ns Server according to these requirements.

Step

Bloomberg Desktop

Bloomberg Server

Bloomberg B-PIPE®

Addblpapi3.jarJAR file to the MATLAB Java class path

Required for connection

Required for connection

Required for connection

Run the Bloomberg Communications Server

Required for connection

Required for connection

Not required

Add JAR Files to theMATLABJavaClass Path

BloombergDesktop,BloombergServer, andBloombergB-PIPE

With the Bloomberg V3 release, install the JAR fileblpapi3.jarfrom Bloomberg. This JAR file ensures thatblp,blpsrv,bpipe, and other Bloomberg commands work correctly.

如果您已经下载blpapi3.jar, find it in a folder such asc:\blp\DAPI\blpapi3.jaror search for it in the Bloomberg installation folderc:\blp. When you have foundblpapi3.jar, go to step 3.

Note

For each Bloomberg connection, the folder location of the downloaded JAR file can be different. For questions, contact Bloomberg.

If you have not downloadedblpapi3.jarfrom Bloomberg, download it as follows:

  1. In the Bloomberg terminal, typeWAPI to open the API Developer’s Help Site screen.

  2. Click API Download Center. Download and install the appropriate software.

  3. Once you haveblpapi3.jaron the system, add it to the MATLAB Java class path. There are two ways to add the JAR file:

    • Add the JAR file to the MATLAB Java class path for every MATLAB session usingjavaaddpath.

      javaaddpathc:\blp\DAPI\blpapi3.jar

      The JAR file path varies depending on the installed Bloomberg software.

    • Or, to automate adding this file, addjavaaddpathto thestartup.mfile or add the full path for the JAR file to thejavaclasspath.txtfile.

    To decide which way is best for you, seeStartup Options in MATLAB Startup FileandJava的静态路径Class Path.

  4. If you modifystartup.morjavaclasspath.txtfiles, restart MATLAB.

Troubleshooting Adding JAR Files

If the JAR files are missing from the MATLAB Java class path, this error message displays:Please verify that blpapi3.jar is included on MATLAB javaclasspath.

To add the JAR files to the MATLAB Java class path, follow the preceding instructions.

For issues with downloading and installing JAR files, contact Bloomberg.

RunBloombergCommunications Server

The Bloomberg Communications Server is a program namedbbcomm.exe. You can find this program in a folder such asc:\blp\DAPI\bbcomm.exeor search for it in the Bloomberg installation folderc:\blp. Ifbbcomm.exedoes not start automatically, double-click it. An MS-DOS®command window opens and stays open whilebbcomm.exeis running.

To avoid manually startingbbcomm.exeeach time you turn on the computer, addbbcomm.exeto the startup folder:

  1. Create a Windows®shortcut tobbcomm.exe.

  2. Move this shortcut to the startup folder. An example startup folder name isC:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.

When you are finished with the Bloomberg connection, stopbbcomm.exeby runningbbstop.exe. You can findbbstop.exein the same folder asbbcomm.exe. Double-clickbbstop.exe. The MS-DOS command window closes.

See Also

||

Related Examples

More About