mardi 24 février 2015

bloomberg API: field not permitted to datafeed users


I use the bloomberg API(c++) to do a project. I have already been able to send a request with an identity. For example, I send a request like this:



Request request = session.createRequest("ReferenceDataRequest");
request.append("securities", "IBM US Equity");
request.append("fields", "PX_LAST");
session.sendRequest(request, identity, CorrelationId(20));


After sending this request, I get a response. But when I release the response, I always get an exception: "NO_AUTH, field not permitted to datafeed users". the function to deal with the response:



void handleResponseEvent(Event e, Identity identity)
{
MessageIterator msgIter(e);
while (msgIter.next())
{
Message message = msgIter.message();
message.print(cout);
}
}


I know that this is not correct because i didn't use the "identity". I think that's why I got an exception "NO_AUTH". Could you please tell me how to release the response with the identity?




Aucun commentaire:

Enregistrer un commentaire