Is there a reliable way to open a specific bloomberg terminal page programmatically (e.g. "MSFT Equity")?
I am open to any suggestions and code samples:
- Start process with path to bloomberg terminal executable and ticker in the arguments
- Bloomberg API
- DDE
- COM Automation
SendKeys (can be blocked by some antivirus software)
- ...
Many thanks
You can get the answer to this through the terminal:
API < GO > > API Developer's Website > WAPI Home > FAQs > Miscellaneous Topics
And the specific question is How can I communicate programmatically with the Bloomberg Professional?
The string you need to send over DDE is
<blp-1><home>MSFT US<EQUITY><GO>DES<GO>
Support for DDE has now been deprecated. From the WAPI miscellaneous topics page
- Do you support retrieving Bloomberg API data programmatically with DDE?
No. We no longer support retrieving Bloomberg data programmatically via the API with DDE. In fact, all DDE help and example content specific to requesting Bloomberg API data with DDE into an application, has been removed. This decision was made for the following reasons:
1.The DDE Server was originally developed to act only as a conduit for retrieving Bloomberg data into Microsoft Excel worksheet cells via Bloomberg DDE links entered into these cells. It was not intended to be used as a programming interface within an application.
2.There are much more efficient and powerful alternatives to requesting Bloomberg API data programmatically from within an application than using DDE (i.e. DDERequest()). In the case of development environments such as Microsoft Excel and Access VBA, for instance, we recommend that you use the COM v3 Data Control. This interface is easy to program to and capable of giving you more control over your request and more flexibility with processing the data reply. In the case of C++, we recommend either the C v3 API interface, or the . For .NET applications, you will want to use the .NET v3 API interface.
We provide samples for all of these interfaces in the Desktop API SDK installation package, which is available for download from the API Download Center.
You can use javascript to create an ActiveX object new ActiveXObject("Excel.Application")
. From this you can use DDE to access an open Bloomberg Terminal Window DDEInitiate("Winblp", "bbk")
and send it a command.
A small point to note here is in
<blp-1><home>MSFT US<EQUITY><GO>DES<GO>
blp-1 is basically blp- + (window number -1)
so if you want to target BLOOMBERG-3 use blp-2 (3-1 = 2)