0

As I am migrating Bloomberg COM based dll to Bloomberg API v3 in .Net, I am facing some issue in matching up the Equivalent method. I tried fetching using ReferenceDataRequest for the security LMCADP 20150819 COMDTY, but prices are not matching. Please suggest which type request should be used.

private void sendRefDataRequest(Session session)
    {
        Service refDataService = session.GetService("//blp/refdata");
        Request request = refDataService.CreateRequest("ReferenceDataRequest");

        // Add securities to request
        Element securities = request.GetElement("securities");

        for (int i = 0; i < d_securities.Count; ++i)
        {
            securities.AppendValue((string)d_securities[i]);
        }

        // Add fields to request
        Element fields = request.GetElement("fields");
        for (int i = 0; i < d_fields.Count; ++i)
        {
            fields.AppendValue((string)d_fields[i]);
        }

        System.Console.WriteLine("Sending Request: " + request);
        session.SendRequest(request, null);
    }

and added securities

if (d_securities.Count == 0)
        {
            d_securities.Add("IBM US Equity");
            d_securities.Add("LMCADP 20150819 COMDTY");
        }
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
DvpNav
  • 1
  • 2
  • what results did you get with the COM API? What results do you get with API V3? What fields are you requesting? – assylias Aug 11 '15 at 12:07
  • Fields that i am passing `if (d_fields.Count == 0) { d_fields.Add("PX_LAST"); }` – DvpNav Aug 11 '15 at 16:40
  • Example for **Bloomberg API** PX_Last is coming **5298.25** and from **COM library** i am getting **5380.15** – DvpNav Aug 11 '15 at 16:45
  • HP shows 5298.25 - not sure where the 5380.15 price is coming from... Have you asked HELP HELP? – assylias Aug 12 '15 at 07:45

1 Answers1

0

BLPSubscribe in Bloomberg's old ActiveX control made either a synchronous subscription or static request depending on the fields you passed in. If you were requesting static fields like PX_LAST then a ReferenceDataRequest would be the appropriate way to obtain the data.

If you were looking at the realtime field LAST_PRICE, however, you would want to make a subscription (build a SubscriptionList out of Subscription objects and then use Session.Subscribe(..)).

amkingTRP
  • 238
  • 4
  • 9