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 :)