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

New to Api and Java

Feb 7, 2014 at 9:34 AM
Hi Robinson first of all thank you for creating the Api.

Robinson I am completely new to Apis and Java, however I have a bit of programming background, I am trying to learn and understand how to use the Api, how can I access it and check that I can connect to it, using Java, as I am trying to then combine it with a software that we are currently using.

So my questions are:
How do I check that the the emulator is up and running.
Can I test it directly by using just a simple code in the command line, and if not what steps do I need to use in order to check that is running and extract data.
Note: I have check the Source Code, I am still quite confuse in how to use the emulator and test it.

Kind regards,

Feb 7, 2014 at 9:33 PM

I'm glad you found my project. Have you looked at the example code files I included in the BEmuJava project? For instance, I show how to get a month's worth of historical quotes in this file

You can use this file with either BEmu or the actual Bloomberg API. I've tested this file with my own Bloomberg account.

You can use the "Java Examples" batch file to see the BEmu Java application in action. The batch file simply runs the following command in the \Robinson664\BEmuInstaller folder:

java -cp BEmu.jar com.examples.App

When you run the Java example application, you'll see this output in your command window:

Bloomberg API Emulator Examples
By: Robinson664

To send a reference data request, push 1
To send a market data request, push 2
To send a historical data request, push 3
To send a intraday tick data request, push 4
To send a intraday bar data request, push 5

If you push 3, you'll run the file that I mentioned above.

Does this help answer your questions? Let me know.

Feb 13, 2014 at 3:20 PM
Dear Jordan,

Thank you for your reply, I have successfully duplicate and run your code using NetBeans, However I am trying to replicate it using a software call Lavastorm, however i Keep getting the following error :

unreported exception java.lang.Exception; must be caught or declared to be thrown

any idea why?

Kind regards,

Feb 18, 2014 at 8:45 PM

Unfortunately, I have no idea what Lavastorm is. Are you talking about I actually can't tell what they do. Your question may be outside the scope of the help I can provide.