使用 Bloomberg API,如何请求 HTUSMOML 和 GSTHHVIP 指数的价格信息
使用 Bloomberg API,如何请求 HTUSMOML 和 GSTHHVIP 指数的价格信息。
下面列出了我正在使用的部分基本代码:
session.OpenService("//blp/refdata");
Service refDataService = session.GetService("//blp/refdata");
Request request = refDataService.CreateRequest("ReferenceDataRequest");
request.Set("security", "HTUSMOML US INDEX");
request.Set("security", "GSTHHVIP US INDEX");
request.Append("fields", "PX_LAST");
request.Append("fields", "OPEN");
我收到错误“Symbol not available in service: ReferenceDataRequest.Thanks
”
RC
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", "HTUSMOML 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过使用相同的语法并请求一个众所周知的索引,例如 INDU 或 QQQQ 之类的?这样就排除了很多可能性。
如果可行,那么您确定这些指数有可用的参考数据吗?有时他们只有定价数据,没有参考数据。
接下来,您确定您有权获取此数据吗?您可能不被允许,或者您的 API 设置可能无法为具有权限的帐户提供正确的身份验证。
如果这些都不起作用,您确实需要按照
帮助帮助
进行操作并致电分析台寻求帮助。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.您应该解决代码中的一些问题:
您可能应该这样做
request.Append("securities", ...);
您指定的黄色密钥应以小写形式给出。
我建议根本不要使用黄色键,而是使用以下格式的彭博全球标识符:
request.Append("securities", "/bbgid/BBG000RGBSK8");
(顺便说一句,BBG000RGBSK8 是 HTUSMOML 索引的实际彭博全球标识符)
There are a few issues with your code you should address:
You probably should be doing
request.Append("securities", ...);
The yellow key which you're specifying should be given in lower case.
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)