我正在尝试从 Excel 加载项迁移到 Bloomberg C# Desktop API。对于像 BDP("AB IB Equity","best_analyst_rating") 这样的简单调用,我可以使用以下方法解决问题:
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");
securities.AppendValue("AB IB Equity");
Element fields = request.GetElement("fields");
fields.AppendValue("best_analyst_rating");
System.Console.WriteLine("Sending Request: " + request);
session.SendRequest(request, null);
}
但是对于涉及 BDP 的其他选项的更复杂的调用,例如 BDP("AB IB Equity","bs_tot_asset","EQY_Consolidated","Y","EQY_FUND_Relative_Period","-0FY") 我不知道如何将其转换为 C#来电。感谢您对此的任何帮助。