gpt4 book ai didi

java - 我如何从 Bloomberg API 获取交易假期

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:07:17 25 4
gpt4 key购买 nike

我正在使用 Bloomberg Java API 下载交易数据。我需要有人告诉我是否存在可以返回交易假期列表的函数。我翻阅了手册,但找不到。如果没有这样的东西,有没有一种好的方法可以创建一个?谢谢。

最佳答案

String field = "CALENDAR_HOLIDAYS";
//String field = "CALENDAR_NON_SETTLEMENT_DATES";
Request request = this._refDataServiceM.CreateRequest("ReferenceDataRequest");
Element securities = request.GetElement("securities");
securities.AppendValue("AAPL US Equity");
Element fields = request.GetElement("fields");
fields.AppendValue(field);

Element overridefields = request.GetElement("overrides");
Element overrides = request.GetElement("overrides");
Element override1 = overrides.AppendElement();
override1.SetElement("fieldId", "SETTLEMENT_CALENDAR_CODE");
override1.SetElement("value", calendar_code);
Element override2 = overrides.AppendElement();
override2.SetElement("fieldId", "CALENDAR_START_DATE");
override2.SetElement("value", startDate.ToString("yyyyMMdd"));
Element override3 = overrides.AppendElement();
override3.SetElement("fieldId", "CALENDAR_END_DATE");
override3.SetElement("value", endDate.ToString("yyyyMMdd"));

关于java - 我如何从 Bloomberg API 获取交易假期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7906254/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com