Search code examples
c++bloomberg

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?

To clarify - I am using B-PIPE, rather than the D-API, to connect to Bloomberg.


Solution

  • Using B-PIPE, have you verified that your OS_LOGON or APPLICATION are authorised for the data that you are requesting?

    If you download the B-PIPE package from WAPI, there is a (Windows) demo application that can be used to check your logon credentials independently of any code that you may be using...

    /path/to/BPipe/APIv3/bin/BLPAPIDemo.exe

    Set your authentication type, host and port:

    enter image description here

    Then test your data request, by setting your tickers/fields/dates and clicking run:

    enter image description here

    If you get an error - e.g. EID permissioning issues - you know that you don't have the authentication for that data. If that's the case, you need to get in touch with the B-PIPE manager at your firm / Bloomberg rep.

    If you don't get an error / do get the data, then the issue is in your code somewhere...