2013-10-24 49 views
0

我使用excel vba發送beqsrequest並處理響應。 bloomberg開發人員指南說BeqsResponse消息具有responseError和securityData元素。在處理響應時,我使用了bloomberg beqs響應元素

Dim securities As blpapicomLib2.Element 
Set securities = message.GetElement("securityData") 

我得到了運行時錯誤5 - 無效的過程調用或參數。但它工作時,我把

Dim securi As blpapicomLib2.Element 
Set securi = message.GetElement("responseError") 

「securityData」有什麼問題?有沒有一種方法可以使用blpapicomLib2從消息中獲取所有元素? 任何意見,將不勝感激。

+0

當您使用結果時,您是否在特定行('Set securities = message.GetElement(「securityData」)')或更高版本上出現錯誤? – assylias

回答

0

頂級securityDatasecurityData元素的數組:

enter image description here

所以你需要做類似ReferenceDataResponse,爲此,你可以找到在doc幾個例子,比如「東西4.4 - 迴應細節「。

+0

在響應詳細信息中,「元素securityDataArray = ReferenceDataResponse.getElement(」securityData「);」用來。而我的消息.AsElement.NumElements給了我1.是否因爲要求? Beqs請求在某些屏幕名稱下要求用戶篩選股票?非常感謝。 – bananaLeaf

+0

我從來沒有使用API​​的eqs來說實話。但是響應圖與RefDataResponse類似,所以應該以相同的方式工作 - 除非他們在文檔中發生錯誤... – assylias

+0

它工作正常。 Beqsresponse.AsElement.NumElements = 1.元素是「數據」。 「securityData」元素是「數據」的子元素。 – bananaLeaf