开发者

Using the Bloomberg API, how do I request the price information for the HTUSMOML and GSTHHVIP indexes

开发者 https://www.devze.com 2023-01-07 22:04 出处:网络
Using the Bloomberg API, how do I request the price information for theHTUSMOML and GSTHHVIP indexes.

Using the Bloomberg API, how do I request the price information for the HTUSMOML and GSTHHVIP indexes.

Part of the basic code which I am using is listed below:

session.OpenService("//blp/refdata");
Service refDataService = session.GetService("//blp/refdata");
Request request = refDataService.CreateRequest("ReferenceDataRequest");
request.Set("security", "HTUSMO开发者_Go百科ML US INDEX");
request.Set("security", "GSTHHVIP US INDEX");
request.Append("fields", "PX_LAST");
request.Append("fields", "OPEN");

I get an error of "Symbol not available in service: ReferenceDataRequest.

Thanks

RC


Have you tried using the same syntax and asking for a well-known index, like INDU or QQQQ or something? That would eliminate a lot of possibilities.

If that works, then are you sure there is reference data available for these indices? Sometimes they only have pricing data, not reference data.

Next, are you sure you are permissioned to get this data? Either you may not be allowed, or your API setup may not be providing proper authentication for an account that does have permission.

If none of that works, you really need to follow Help Help and call the analytics desk for assistance.


There are a few issues with your code you should address:

  1. You're setting the security twice, the second time overrides the first
  2. You probably should be doing

    request.Append("securities", ...);

  3. The yellow key which you're specifying should be given in lower case.

  4. Index securities don't have an exchange in their name - lose the US, it's just "HTUSMOML Index"
  5. I recommend not using the yellow key at all, instead use the Bloomberg Global Identifier in this format:

    request.Append("securities", "/bbgid/BBG000RGBSK8");

(BTW, BBG000RGBSK8 is the actual Bloomberg Global Identifier for HTUSMOML Index)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号