Search code examples
excelrequestbloombergvba

bloomberg beqs response elements


I'm using excel vba to send beqsrequest and handle response. The bloomberg developer's guide says BeqsResponse message has responseError and securityData element. When handling the response, I used

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

I got run-time error 5 - invalid procedure call or argument. However it worked when I put

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

What's wrong with "securityData" ? And is there a way to get all the elements from message using blpapicomLib2 ? Any advice would be appreciated.


Solution

  • The top level securityData is an array of securityData elements:

    enter image description here

    So you need to do something similar to a ReferenceDataResponse, for which you can find several examples in the doc, such as in "4.4 - Response Details".