I'm currently trying to connect to the Bloomberg API but after trying for a day still not able to get it running.
Below is sample code from the API Guide, the part where I keep getting "Could not start session." when trying to connect.
public static void main(String[] args) throws Exception {
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.setServerHost("localhost"); // default value
sessionOptions.setServerPort(8194); // default value
Session session = new Session(sessionOptions);
if (!session.start()) {
System.out.println("Could not start session.");
System.exit(1);
}
if (!session.openService("//blp/refdata")) {
System.out.println("Could not open service " +
"//blp/refdata");
System.exit(1);
}
}
I also tried the async example available in the guide, but no luck as well.
Is there anything that I missed in order to use the API? Or if I have to apply for an account in order to use the API, please do let me know :)
From the Windows Start menu, select START > All Programs > Bloomberg > BLOOMBERG. Once you open the application, the following Bloomberg panel (“window”) appears on your desktop. Once you open the Bloomberg Terminal application, you must log in with a login name and password. Click on one of the Bloomberg panels.
Bloomberg API MASTER RECORDThe established service provides free, unrestricted access to raw data for customers for its financial market information. The same publish/subscribe and request/response interactions available via its proprietary interface can be accessed via API.
Bloomberg Industry Leaderboard Uses REST API for Financial Data Visualization; Imagine What You Could be Doing with Your Data Assets.
Your program runs fine on my machine. The few things you should check:
bbcom.exe
process running?Just read the last line of your question: you need to have a Bloomberg account to be able to use their API and retrieve data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With