This project has moved and is read-only. For the latest updates, please go here.

Bloomberg Securities and Fields

Apr 4, 2014 at 9:27 AM
there's a method that allow me to retrieve the list of securities or fields that can be used in ReferenceDataRequest?
Apr 4, 2014 at 3:48 PM

With small exceptions, the only way I know how to do this is within a Bloomberg Terminal. The terminal has some screens (which I've never used) that can list out securities. Also, the terminal can auto-fill a search for a security. So when I go to look up information for MSFT, when I type M, other securities that start with M appear.

For fields, again I do this using the terminal. When I type in a security, I can use the <FLDS> command to see what fields are available for that security. Stocks have different fields than stock options or government bonds.

If there's a way to do this using only BB API calls, I don't know it. The number of fields I need to use is actually pretty small.

The exception for lists of securities that I mentioned involves option chain information. You can get an option chain for a stock using a BB API call. See my notes about "CHAIN_TICKERS" in the documentation tab.

Bloomberg may consider the list of securities and fields they provide proprietary, so they may make it difficult to get this information. Does this answer your question?

Apr 4, 2014 at 4:26 PM
Hi Robinson and thank you for your response.

I asked this question because I am developing an integration with Bloomberg for a client and then I do not have direct access to the Bloomberg terminal.

Clearly, the software must be executed within the Bloomberg terminal.

You know if you can connect with the open API outside of a Bloomberg terminal?

thank you very much
Apr 4, 2014 at 6:32 PM

Your question is related to one of the limitations of my project that I mention in the Documentation tab: specifically the securities and fields sections. When you run the software you write in a production environment, it will need some kind of BB license that includes BB API access. As for knowing which fields exist for which securities, my project cannot help you with that. I don't even know how to go about providing a solution for that other than to say that you need a Bloomberg account.

When you ask about the Open API, do you mean the files provided here ? The code you write for that will give you an error message that says something like "not connected to Bloomberg" if you aren't logged in. That error message is the impetus for my BEmu project. The Open API will work if you have a BB account (I have one). The API files you download are also available in the BB terminal at <WAPI>.

Let me know if this helps.

Apr 8, 2014 at 10:01 AM
then these lines of code

SessionOptions sessionOptions = new SessionOptions();
sessionOptions.setServerHost("localhost"); // default value

only work on the Bloomberg terminal right?

I know the question is out of scope of your project, but do you have any example, instead of using a bloomberg account to connect from the outside of a Bloomberg terminal (I ask my client to give me the account bloomberg)?

thank you very much
Apr 8, 2014 at 7:33 PM
Those lines of code work with both the actual BB API, and my BEmu project. When you actually try to start the session using the BB API, and you're not already logged in to your BB account, you'll get a message that says "not logged in" or something similar.

Try to do the same with my BEmu project, and the code will work just fine. Have you tried to run my example projects? Are you using the Java version? The examples are here:

At the top of that file, I have
import com.bemu.BEmu.*; //un-comment this line to use the Bloomberg API Emulator
//import com.bloomberglp.blpapi.*; //un-comment this line to use the actual Bloomberg API
This causes the code to use my BEmu project. Switch the lines so that the BEmu line is commented and the blpapi line is not commented. Once you do this, run the code again and see what happens. The code won't connect unless you're logged in to a Bloomberg account.

I don't understand your last question. what do you mean "instead of using a bloomberg account to connect from the outside of a Bloomberg terminal"?
Apr 9, 2014 at 9:43 AM
I use c# code.
I run an examlpe with your Emu and is ok. I can download data.

But this code works only if it is installed on the PC, "Bloomberg Professional Service" right?
the reason for my last question is that I thought it was possible to connect to Bloomberg with a PC in which"Bloomberg Professional Service" is not installed.
Apr 10, 2014 at 2:27 PM
But this code works only if it is installed on the PC, "Bloomberg Professional Service" right?
The actual BB API? Yes. As far as I know, it will only work on the same computer on which your Bloomberg account is running. I think I see why you were asking about this line of code:
The only values I can get to work for the host are "localhost" and "". I've tried connecting to computer A from computer B, where computer A is logged in to Bloomberg, and computer B uses computer A's IP address. I can't get that to work.
Apr 10, 2014 at 3:25 PM
FYI, data retrieved via the BB "terminal" cannot leave the PC in which it was installed/contracted. May be they somehow prevented logging in remotely.
Apr 10, 2014 at 5:08 PM
I forgot about that. We're supposed to treat our computer as a silo that holds that data. I think however that data can leave your computer if you have a SAPI license.
Apr 14, 2014 at 4:40 PM
Edited Apr 15, 2014 at 10:17 AM
Why your emulator project return 2 element for every couple security-field?
Is an application bug or is the same behavior of bloomber API?
Apr 15, 2014 at 6:56 PM
Can you explain what you mean? Are you talking about my example code, or code that you have written? What request type are you using (e.g., Reference Data, Market Data, Intraday Tick Data). What are you requesting? What does your response that has these two elements look like (use Message.ToString() for a print-out).