我在使用Open API(.Net平台)功能请求Bloomberg时遇到的问题很少。我只是将excel函数转换为应用程序。请参阅下面的代码。
现有的Excel要求
= BDP(A6,COL1:VAL1,COL2:val2)将
?如何发送上述请求?
= BDP($ A7,CORR_COEF,BETA_RAW_OVERRIDABLE,CIU权益,CORR_COEF:BETA_OVERRIDE_START_DT,Date1:Date2,“BETA_OVERRIDE_PERIOD = d”)
?如何发送上述请求?
= BDS(B1, “TOP_MUTUAL_FUND_HOLDINGS”, “EndCol = 2”, “StartCol = 2”, “COLS = 1;行数= 10”)
Request request = clsConnection.stRefDataService.CreateRequest("ReferenceDataRequest");
Element securities = request.GetElement("securities");
Element fields = request.GetElement("fields");
securities.AppendValue("AAA Equity");
fields.AppendValue("TOP_MUTUAL_FUND_HOLDINGS");
AddOverride(request, "EndCol", "2");
AddOverride(request, "StartCol", "2");
AddOverride(request, "cols", "1");
AddOverride(request, "rows", "10");
你能帮我纠正上面代码中的错误吗?
= BDH(A9,“CORR_COEF”,columnA,columnB,“BETA_CALC_INTERVAL_OVERRIDE = 1y”,“BETA_OVERRIDE_PERIOD = d”,“DTS = h”,“BETA_OVERRIDE_REL_INDEX = AA索引”)
Request request = clsConnection.stRefDataService.CreateRequest("ReferenceDataRequest");
Element securities = request.GetElement("securities");
Element fields = request.GetElement("fields");
securities.AppendValue("AAA Equity");
fields.AppendValue("CORR_COEF");
AddOverride(request,"BETA_CALC_INTERVAL_OVERRIDE", "1y");
AddOverride(request, "BETA_OVERRIDE_PERIOD", "d");
AddOverride(request, "DTS", "h");
AddOverride(request, "BETA_OVERRIDE_REL_INDEX", "AAIndex");
private void AddOverride(Request request, string fieldId, string fieldValue)
{
var override1 = request["overrides"].AppendElement();
override1.SetElement("fieldId", fieldId);
override1.SetElement("value", fieldValue);
}
你能帮我纠正上面代码中的错误吗?