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® |
---|---|---|---|
Add |
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.jar
from 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.jar
or 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.jar
from Bloomberg, download it as follows:
In the Bloomberg terminal, type
WAPI
to open the API Developer’s Help Site screen.Click API Download Center. Download and install the appropriate software.
Once you have
blpapi3.jar
on 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 using
javaaddpath
.javaaddpathc:\blp\DAPI\blpapi3.jar
The JAR file path varies depending on the installed Bloomberg software.
Or, to automate adding this file, add
javaaddpath
to thestartup.m
file or add the full path for the JAR file to thejavaclasspath.txt
file.
To decide which way is best for you, seeStartup Options in MATLAB Startup FileandJava的静态路径Class Path.
If you modify
startup.m
orjavaclasspath.txt
files, 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.exe
or search for it in the Bloomberg installation folderc:\blp
. Ifbbcomm.exe
does not start automatically, double-click it. An MS-DOS®command window opens and stays open whilebbcomm.exe
is running.
To avoid manually startingbbcomm.exe
each time you turn on the computer, addbbcomm.exe
to the startup folder:
Create a Windows®shortcut to
bbcomm.exe
.Move this shortcut to the startup folder. An example startup folder name is
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
.
When you are finished with the Bloomberg connection, stopbbcomm.exe
by runningbbstop.exe
. You can findbbstop.exe
in the same folder asbbcomm.exe
. Double-clickbbstop.exe
. The MS-DOS command window closes.