0

I am using com.assylias.jbloomberg package and have managed to get the example code to run. I currently use the BB API's on an Excel spreadsheet. The formula I have is

=BDS({isin-code},"FACTOR_SCHEDULE","cols=2;rows=3")

This returns data as per the BB function DES {isin-code}/BB page 20 Schedules/BB page 56 Factor History. That is: Date and Factor%, repeated many times.

My question is: how would I code this using the com.assylias.jbloomberg? I assume I would need to create an instance of a RequestBuilder object. What parameters would I pass in? Thanks in advance. Any help or pointers to PDF documentation much appreciated. Colin

nhouser9
  • 6,730
  • 3
  • 21
  • 42
C Lacy
  • 11
  • You need to try on your own. We are not a code writing service. If you try and run into an issue, then ask. – nhouser9 Feb 17 '17 at 17:03

1 Answers1

0

For bulk fields, you need to use a ReferenceRequestBuilder - it would look like this:

BloombergSession bb = new DefaultBloombergSession();
try {
  bb.start();
  String isin = "/isin/XS0889937305";
  String field = "FACTOR_SCHEDULE";
  ReferenceData data = bb.submit(new ReferenceRequestBuilder(isin, field)).get();
  List<Map<String, TypedObject>> asList = (List<Map<String, TypedObject>>) data.forField(field).forSecurity(isin).get();
  asList.forEach(System.out::println);
} finally {
  bb.stop();
}
assylias
  • 321,522
  • 82
  • 660
  • 783