Soap Bloomberg数据许可证Web服务包装器

Soap Bloomberg数据许可证Web服务包装器,soap,bloomberg,Soap,Bloomberg,我正在往里看。请注意,这与彭博API(会话/服务/请求、b管道等)不同。它是一种基于SOAP的解决方案,用于从彭博数据库检索参考数据。我创建了一个测试应用程序,只是为了快速评估此解决方案: var client = new PerSecurityWSClient("PerSecurityWSPort"); client.ClientCredentials.ClientCertificate.Certificate = new X509Certificate2("{path-to-cer

我正在往里看。请注意,这与彭博API(会话/服务/请求、b管道等)不同。它是一种基于SOAP的解决方案,用于从彭博数据库检索参考数据。我创建了一个测试应用程序,只是为了快速评估此解决方案:

    var client = new PerSecurityWSClient("PerSecurityWSPort"); 
client.ClientCredentials.ClientCertificate.Certificate = new X509Certificate2("{path-to-certificate}", "{password}");
client.ClientCredentials.UserName.UserName = "";
client.ClientCredentials.UserName.Password = "";
client.ClientCredentials.Windows.ClientCredential.Domain = "";

var companyFields = new string[] { "ID_BB_COMPANY", "ID_BB_ULTIMATE_PARENT_CO_NAME" , /* ... all other fields I'm interested in */ };
var getCompanyRequest = new SubmitGetCompanyRequest {
    headers = new GetCompanyHeaders { creditrisk = true },
    instruments = new Instruments {
            instrument = new Instrument[] { 
                new Instrument { id = "AAPL US", yellowkey = MarketSector.Equity, yellowkeySpecified = true },
                new Instrument { id = "PRVT US", yellowkey = MarketSector.Equity, yellowkeySpecified = true }
            }
    },
    fields = companyFields
};
var response = client.submitGetCompanyRequest(getCompanyRequest);
if(response.statusCode.code != SUCCESS) {
    System.Console.Error.WriteLine("Response status is " + response.statusCode);
    return;
}
var retrieve = new RetrieveGetCompanyRequest { responseId = response.responseId };
RetrieveGetCompanyResponse getCompanyResponse = null;
do {
    System.Console.Write("*");
    Thread.Sleep(1000);
    getCompanyResponse = client.retrieveGetCompanyResponse(retrieve);
} while (getCompanyResponse.statusCode.code == DATA_NOT_AVAILABLE);

if (getCompanyResponse.statusCode.code != SUCCESS) {
    System.Console.Error.WriteLine("Response status is " + response.statusCode);
    return;
}

System.Console.WriteLine();
foreach (var instrumentData in getCompanyResponse.instrumentDatas) {
    Console.WriteLine("Data for: " + instrumentData.instrument.id + " [" + instrumentData.instrument.yellowkey + "]");
    int fieldIndex = 0;
    foreach (var dataEntry in instrumentData.data) {
        if (dataEntry.isArray) {
            Console.WriteLine(companyFields[fieldIndex] + ":");
            foreach(var arrayEntry in dataEntry.bulkarray) {
                foreach(var arrayEntryData in arrayEntry.data) {
                    Console.WriteLine("\t" + arrayEntryData.value);
                }
            }
        }
        else {
            Console.WriteLine(companyFields[fieldIndex] + ": " + dataEntry.value);
        }

        ++fieldIndex;
    }
    System.Console.WriteLine("-- -- -- -- -- -- -- -- -- -- -- -- --");
}
代码看起来有些臃肿(事实上,2015年是基于SOAP的)。因此,我的问题是——我假设应该有一些包装器、帮助器,以及其他任何东西来促进参考数据检索。这里有人在使用DLWS吗?BB DLW周围是否有已知的库?它应该这么慢吗


谢谢。

我自己也刚刚开始。有两个用于请求数据的选项:SFTP和Web服务。据我所知,SFTP选项需要彭博应用程序(“请求生成器”)来检索数据

第二个选项(Web服务)似乎没有很好的文档记录,至少对于那些使用R的人(比如我自己)。因此,我怀疑目前是否存在用于Web服务的库。Bloomberg提供身份验证证书,以便访问其网络以及其web服务主机和端口信息。现在,就使用这些信息连接和下载数据而言,我仍然无法做到这一点


如果您或任何其他人能够使用彭博网络服务和R成功连接和提取数据,请将详细代码发布到本博客

Joe,Bloomberg将关闭Web服务访问,只有SFTP可用。这并不是那么糟糕,因为您不需要编写所有这些样板代码来跟踪连接、请求等。尽管通过SFTP获取数据有一些技巧(例如,您请求“每天23:00,但文件可能在23:05出现,然后在23:10更新”),但关于请求生成器,您可以创建自己的”“请求文件”,这基本上是关于从/序列化/反序列化到类似于.csv的.csv代码。我只是想通过Node.js尝试他们的Web服务(使用节点soap,使用JSON而不是XML)。我想知道,你最终能做到这一点吗?@rezdm现在是2017年年中,Web服务访问仍然存在。你有关于它的使用寿命的权威信息吗?我们需要与它进行交互,如果它消失了,我不想构建一个新的客户端(Ruby)。@MarkThomas,不确定,因为我们还是切换到了sftp。